File Coverage

blib/lib/XML/Fast.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 1 1 100.0
total 29 29 100.0


line stmt bran cond sub pod time code
1             package XML::Fast;
2              
3 6     6   186697 use 5.008008;
  6         26  
  6         250  
4 6     6   98 use strict;
  6         14  
  6         222  
5 6     6   31 use warnings;
  6         15  
  6         204  
6 6     6   6137 use Encode;
  6         99609  
  6         641  
7              
8 6     6   53 use base 'Exporter';
  6         13  
  6         2062  
9             our @EXPORT_OK = our @EXPORT = qw( xml2hash );
10              
11             our $VERSION = '0.11';
12              
13 6     6   37 use XSLoader;
  6         11  
  6         955  
14             XSLoader::load('XML::Fast', $VERSION);
15              
16             sub xml2hash($;%) {
17 51     51 1 39052 my $xml = shift;
18 51         349 my %args = (
19             order => 0, # not impl
20             attr => '-', # ok
21             text => '#text', # ok
22             join => '', # ok
23             trim => 1, # ok
24             cdata => undef, # ok + fallback -> text
25             comm => undef, # ok
26             @_
27             );
28 51         9967 _xml2hash($xml,\%args);
29             }
30              
31             1;
32             __END__