
HTML::MobileJpCSS - css inliner and converter

use HTML::MobileJpCSS; my $inliner = HTML::MobileJpCSS->new(base_dir => '/path/to/documentroot/'); $inliner->apply(<<'...'); <?xml version="1.0" encoding="Shift_JIS"?> <!DOCTYPE html PUBLIC "-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/2.1) 1.0//EN" "i-xhtml_4ja_10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <link rel="stylesheet" href="/css/foo.css" /> </head> <body> <div class="title">bar</div> </body> </html> ... # foo.css .title { color: red; } # result <?xml version="1.0" encoding="Shift_JIS"?> <!DOCTYPE html PUBLIC "-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/2.1) 1.0//EN" "i-xhtml_4ja_10.dtd"> <html> <head> <link rel="stylesheet" href="/css/foo.css" /> </head> <body> <div class="title" style="color:red;">bar</div> </body> </html>

HTML::MobileJpCSS is css inliner. this module is possible the specification of a style based EZweb in each career(DoCoMo,EZweb,Softbank[,Willcom])

constructor of HTML::MobileJpCSS->new();
HTTP_USER_AGENT or instance of HTTP::MobileAgent (default: instance of HTTP::MobileAgent)
inline css when user_agent is EZweb (default: none)
concatenate local css file specified with '<link rel="stylesheet" href="/css/foo.css">' (default: none)
my $inliner = HTML::DoCoMoCSS->new(base_dir => '/path/to');
read css file (default: none)
my $inliner = HTML::DoCoMoCSS->new(css_file => '/path/to/css/foo.css');
you can specify each career style with \%hash "EXAMPLES" my $inliner = HTML::DoCoMoCSS->new(style => { hr => { text-align => { I => 'float', }, }, });

Kazunari Komoriya <kmry1462@gmail.com>

Copyright (c) 2009, Kazunari Komoriya <komoriya@livedoor.jp>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
