File Coverage

blib/lib/EBook/Ishmael/CharDet/ISO2022JP.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 23 25 92.0


line stmt bran cond sub pod time code
1             package EBook::Ishmael::CharDet::ISO2022JP;
2 18     18   243 use 5.016;
  18         51  
3             our $VERSION = '2.05';
4 18     18   90 use strict;
  18         26  
  18         366  
5 18     18   54 use warnings;
  18         22  
  18         711  
6              
7 18     18   79 use parent 'EBook::Ishmael::CharDet::ISO2022';
  18         24  
  18         81  
8              
9             sub new {
10              
11 23     23 0 50 my ($class) = @_;
12              
13 23         47 my $self = bless {}, $class;
14 23         180 $self->SUPER::initialize;
15              
16             $self->{Unique} = [
17 23         90 '(B', # To ASCII
18             '(J', # To JIS X 0201-1976
19             '$@', # To JIS X 0208-1978
20             '$B', # To JIX X 0208-1983
21             ];
22              
23 23         139 return $self;
24              
25             }
26              
27 19     19 0 134 sub encoding { 'iso-2022-jp' }
28              
29             1;