File Coverage

blib/lib/Encode/JP/Mobile/MIME/DoCoMo.pm
Criterion Covered Total %
statement 14 14 100.0
branch 1 2 50.0
condition 1 3 33.3
subroutine 5 5 100.0
pod n/a
total 21 24 87.5


line stmt bran cond sub pod time code
1             package Encode::JP::Mobile::MIME::DoCoMo;
2 24     24   224 use strict;
  24         44  
  24         1596  
3             Encode::Alias::define_alias('MIME-Header-JP-Mobile-DoCoMo' => 'MIME-Header-JP-Mobile-DoCoMo-SJIS');
4             Encode::Alias::define_alias('MIME-Header-JP-Mobile-iMode' => 'MIME-Header-JP-Mobile-DoCoMo-SJIS');
5              
6              
7             package Encode::JP::Mobile::MIME::DoCoMo::SJIS;
8 24     24   155 use strict;
  24         41  
  24         675  
9 24     24   122 use base 'Encode::JP::Mobile::MIME';
  24         47  
  24         15887  
10             __PACKAGE__->Define('MIME-Header-JP-Mobile-DoCoMo-SJIS');
11              
12             Encode::Alias::define_alias('MIME-Header-JP-Mobile-iMode-SJIS' => 'MIME-Header-JP-Mobile-DoCoMo-SJIS');
13              
14             sub subject_encoding {
15 1     1   5 Encode::find_encoding('x-sjis-docomo');
16             }
17              
18             sub charset_to_encoding {
19 1     1   3 my ($self, $charset) = @_;
20            
21 1 50 33     11 if (!$charset || $charset =~ /shift_jis/i) {
22 1         3 $charset = 'x-sjis-docomo';
23             }
24            
25 1         3 Encode::find_encoding($charset);
26             }
27              
28             1;