File Coverage

blib/lib/XML/SAX/PurePerl/UnicodeExt.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 10 11 90.9


line stmt bran cond sub pod time code
1             # $Id$
2              
3             package XML::SAX::PurePerl;
4 12     12   251 use strict;
  12         27  
  12         562  
5              
6 12     12   70 no warnings 'utf8';
  12         26  
  12         1736  
7              
8             sub chr_ref {
9 2     2 0 8 return chr(shift);
10             }
11              
12             if ($] >= 5.007002) {
13             require Encode;
14            
15             Encode::define_alias( "UTF-16" => "UCS-2" );
16             Encode::define_alias( "UTF-16BE" => "UCS-2" );
17             Encode::define_alias( "UTF-16LE" => "ucs-2le" );
18             Encode::define_alias( "UTF16LE" => "ucs-2le" );
19             }
20              
21             1;
22