NAME
HTML::MobileJpCSS - css inliner and converter
SYNOPSIS
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>
DESCRIPTION
HTML::MobileJpCSS is css inliner.
this module is possible the specification of a style based EZweb in each career(DoCoMo,EZweb,Softbank[,Willcom])
METHODS
- new(%option)
-
constructor of HTML::MobileJpCSS->new();
- agent
-
HTTP_USER_AGENT or instance of HTTP::MobileAgent (default: instance of HTTP::MobileAgent)
- inliner_ezweb
-
inline css when user_agent is EZweb (default: none)
- base_dir
-
concatenate local css file specified with '<link rel="stylesheet" href="/css/foo.css">' (default: none)
my
$inliner
= HTML::DoCoMoCSS->new(
base_dir
=>
'/path/to'
);
- css_file
-
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'
);
- css
-
read css (default: none) force inline css when user_agent is EZweb
my
$inliner
= HTML::DoCoMoCSS->new(
css
=> {
'.color-red'
=> {
color
=>
'blue'
});
- apply($content)
AUTHOR
Kazunari Komoriya <kmry1462@gmail.com>
LICENCE AND COPYRIGHT
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.