blib/lib/XML/Fast.pm

filter: Statementstmt 90.0% 27 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 100% 2 / 2 totaltotal 90.2% 37 / 41 CC 1 SCAR 1.1
CC
1
Cov
90%
hash2xml
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary Fast.xs »
1 package XML::Fast;
2  
3 6 ▶use 5.008008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 6 ▶use warnings;no warnings 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
6 6 ▶use Encode;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 6 our @EXPORT_OK = our @EXPORT = qw( xml2hash hash2xml );
10  
11 6 our $VERSION = '0.17';
12  
13 6 ▶use XSLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 6 XSLoader::load('XML::Fast', $VERSION);
15  
16 52 ▶sub xml2hash($;%) {
Subroutine xml2hash: called CC=1 SCAR=0.0
Pod documented
17 52 my $xml = shift;
18 52 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 52 _xml2hash($xml,\%args);
29 }
30  
31 0 ▶sub hash2xml($;%) {
Subroutine hash2xml: not called CC=1 SCAR=6.9
Pod documented
32 0 my $xml = shift;
33 0 my %args = (
34 order => 0, # not impl
35 attr => '-', # ok
36 text => '#text', # ok
37 join => '', # ok
38 trim => 1, # ok
39 cdata => undef, # ok + fallback -> text
40 comm => undef, # ok
41 @_
42 );
43 0 _hash2xml($xml,\%args);
44 }
45  
46 6 1;
47 __END__
↑ Summary Fast.xs »