| 1 | package Amon2::Plugin::Web::MobileCharset; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use HTTP::MobileAgent::Plugin::Charset; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Encode::JP::Mobile 0.29; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Amon2::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | sub init { | ||||||||
|
Subroutine
init: called CC=1 SCAR=2.6
Pod
undocumented
| |||||||||||
| 9 | 1 | my ($class, $c, $conf) = @_; | |||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | Amon2::Util::add_method($c, 'html_content_type' => sub { | ||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||
| 12 | 0 | my $ma = shift->mobile_agent; | |||||||||
| 13 | 0 | ▶ | my $ct = $ma->is_docomo ? 'application/xhtml+xml;charset=' : 'text/html;charset='; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 0 | ▶ | $ct .= $ma->can_display_utf8 ? 'utf-8' : 'Shift_JIS'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 0 | $ct; | |||||||||
| 16 | 1 | }); | |||||||||
| 17 | |||||||||||
| 18 | 1 | ▶ | Amon2::Util::add_method($c, 'encoding' => sub { | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 19 | shift->mobile_agent->encoding | ||||||||||
| 20 | 1 | }); | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 1 | 1; | |||||||||
| 24 | __END__ | ||||||||||