line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::Hash::XS; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
619525
|
use 5.008008; |
|
8
|
|
|
|
|
92
|
|
4
|
8
|
|
|
8
|
|
43
|
use strict; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
197
|
|
5
|
8
|
|
|
8
|
|
38
|
use warnings; |
|
8
|
|
|
|
|
23
|
|
|
8
|
|
|
|
|
274
|
|
6
|
8
|
|
|
8
|
|
42
|
use vars qw($VERSION @EXPORT @EXPORT_OK); |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
651
|
|
7
|
8
|
|
|
8
|
|
51
|
use base 'Exporter'; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
1759
|
|
8
|
|
|
|
|
|
|
@EXPORT_OK = @EXPORT = qw( hash2xml xml2hash ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$VERSION = '0.53'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
require XSLoader; |
13
|
|
|
|
|
|
|
XSLoader::load('XML::Hash::XS', $VERSION); |
14
|
|
|
|
|
|
|
|
15
|
8
|
|
|
|
|
2327
|
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
|
8
|
|
|
8
|
|
62
|
); |
|
8
|
|
|
|
|
15
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# 'NATIVE' or 'LX' |
21
|
|
|
|
|
|
|
$method = 'NATIVE'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# native options |
24
|
|
|
|
|
|
|
$output = undef; |
25
|
|
|
|
|
|
|
$root = 'root'; |
26
|
|
|
|
|
|
|
$version = '1.0'; |
27
|
|
|
|
|
|
|
$encoding = ''; |
28
|
|
|
|
|
|
|
$utf8 = 1; |
29
|
|
|
|
|
|
|
$indent = 0; |
30
|
|
|
|
|
|
|
$canonical = 0; |
31
|
|
|
|
|
|
|
$use_attr = 0; |
32
|
|
|
|
|
|
|
$content = undef; |
33
|
|
|
|
|
|
|
$xml_decl = 1; |
34
|
|
|
|
|
|
|
$keep_root = 0;# |
35
|
|
|
|
|
|
|
$doc = 0; |
36
|
|
|
|
|
|
|
$max_depth = 1024; |
37
|
|
|
|
|
|
|
$buf_size = 4096; |
38
|
|
|
|
|
|
|
$trim = 0; |
39
|
|
|
|
|
|
|
$force_array = undef; |
40
|
|
|
|
|
|
|
$force_content = 0; |
41
|
|
|
|
|
|
|
$merge_text = 0; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# XML::Hash::LX options |
44
|
|
|
|
|
|
|
$attr = '-'; |
45
|
|
|
|
|
|
|
$text = '#text'; |
46
|
|
|
|
|
|
|
$cdata = undef; |
47
|
|
|
|
|
|
|
$comm = undef; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
__END__ |