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> </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) force inline css when user_agent is EZweb
my $inliner = HTML::DoCoMoCSS->new(css_file => '/path/to/css/foo.css');
read css (default: none) force inline css when user_agent is EZweb
my $inliner = HTML::DoCoMoCSS->new(css => {'.color-red' => { color => 'blue' });
Kazunari Komoriya <kmry1462@gmail.com>
<kmry1462@gmail.com>
Copyright (c) 2009, Kazunari Komoriya <komoriya@livedoor.jp>. All rights reserved.
<komoriya@livedoor.jp>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
HTML::DoCoMoCSS, CSS::Tiny, HTTP::MobileAgent
To install HTML::MobileJpCSS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::MobileJpCSS
CPAN shell
perl -MCPAN -e shell install HTML::MobileJpCSS
For more information on module installation, please visit the detailed CPAN module installation guide.