File Coverage

lib/SJIS2004/R2.pm
Criterion Covered Total %
statement 38 38 100.0
branch 1 2 50.0
condition n/a
subroutine 9 9 100.0
pod n/a
total 48 49 97.9


line stmt bran cond sub pod time code
1             package SJIS2004::R2;
2             ######################################################################
3             #
4             # SJIS2004::R2 - provides minimal SJIS2004 I/O subroutines by short name
5             #
6             # http://search.cpan.org/dist/SJIS2004-R2/
7             #
8             # Copyright (c) 2019 INABA Hitoshi in a CPAN
9             ######################################################################
10              
11 12     12   38589 use 5.00503; # Galapagos Consensus 1998 for primetools
  12         105  
12             # use 5.008001; # Lancaster Consensus 2013 for toolchains
13              
14             $VERSION = '0.05';
15             $VERSION = $VERSION;
16              
17 12     12   66 use strict;
  12         24  
  12         384  
18 12 50   12   226 BEGIN { $INC{'warnings.pm'} = '' if $] < 5.006 }; use warnings; $^W=1;
  12     12   88  
  12         43  
  12         559  
19 12     12   6220 use UTF8::R2;
  12         68729  
  12         70  
20 12     12   5872 use IOas::SJIS2004;
  12         32206385  
  12         108  
21              
22             sub import {
23 12     12   1051 no strict qw(refs);
  12         26  
  12         3041  
24 12     12   197 tie my %mb, 'UTF8::R2';
25 12         82 *{caller().'::mb'} = \%mb;
  12         92  
26 12     16   48 *{caller().'::mbeach'} = sub { UTF8::R2::split(qr//,$_[0]) };
  12         73  
  16         1070  
27 12         37 *{caller().'::mbtr' } = \&UTF8::R2::tr;
  12         46  
28 12         28 *{caller().'::iolen' } = \&IOas::SJIS2004::length;
  12         42  
29 12         29 *{caller().'::iomid' } = \&IOas::SJIS2004::substr;
  12         46  
30 12         25 *{caller().'::ioget' } = \&IOas::SJIS2004::readline;
  12         45  
31 12         26 *{caller().'::ioput' } = \&IOas::SJIS2004::print;
  12         43  
32 12         27 *{caller().'::ioputf'} = \&IOas::SJIS2004::printf;
  12         43  
33 12         27 *{caller().'::iosort'} = \&IOas::SJIS2004::sort;
  12         402  
34             }
35              
36             1;
37              
38             __END__