File Coverage

blib/lib/XML/Hash/XS.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 23 23 100.0


line stmt bran cond sub pod time code
1             package XML::Hash::XS;
2              
3 18     18   2178101 use 5.008008;
  18         65  
4 18     18   90 use strict;
  18         69  
  18         512  
5 18     18   83 use warnings;
  18         38  
  18         1217  
6 18     18   98 use vars qw($VERSION @EXPORT @EXPORT_OK);
  18         45  
  18         1584  
7 18     18   136 use base 'Exporter';
  18         29  
  18         4336  
8             @EXPORT_OK = @EXPORT = qw( hash2xml xml2hash );
9              
10             $VERSION = '0.64';
11              
12             require XSLoader;
13             XSLoader::load('XML::Hash::XS', $VERSION);
14              
15 18         5282 use vars qw($method $output $root $version $encoding $utf8 $indent $canonical
16             $use_attr $content $xml_decl $doc $max_depth $attr $text $trim $cdata
17             $comm $buf_size $keep_root $force_array $force_content $merge_text
18             $suppress_empty
19 18     18   127 );
  18         30  
20              
21             # 'NATIVE' or 'LX'
22             $method = 'NATIVE';
23              
24             # native options
25             $output = undef;
26             $root = 'root';
27             $version = '1.0';
28             $encoding = '';
29             $utf8 = 1;
30             $indent = 0;
31             $canonical = 0;
32             $use_attr = 0;
33             $content = undef;
34             $xml_decl = 1;
35             $keep_root = 1;
36             $doc = 0;
37             $max_depth = 1024;
38             $buf_size = 4096;
39             $trim = 0;
40             $force_array = undef;
41             $force_content = 0;
42             $merge_text = 0;
43             $suppress_empty = 0;
44              
45             # XML::Hash::LX options
46             $attr = '-';
47             $text = '#text';
48             $cdata = undef;
49             $comm = undef;
50              
51             1;
52             __END__