line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::Vparam::XML; |
2
|
73
|
|
|
73
|
|
3939694
|
use Mojo::Base -strict; |
|
73
|
|
|
|
|
132298
|
|
|
73
|
|
|
|
|
410
|
|
3
|
73
|
|
|
73
|
|
8036
|
use Mojolicious::Plugin::Vparam::Common qw(load_class); |
|
73
|
|
|
|
|
137
|
|
|
73
|
|
|
|
|
12713
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub parse_xml($) { |
6
|
5
|
|
|
5
|
0
|
280
|
my $str = shift; |
7
|
5
|
50
|
|
|
|
28
|
return undef unless defined $str; |
8
|
5
|
100
|
|
|
|
24
|
return undef unless length $str; |
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
|
|
27
|
my $e = load_class('XML::LibXML'); |
11
|
4
|
50
|
|
|
|
58551
|
die $e if $e; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
0
|
my $dom = eval{ XML::LibXML->load_xml(string => $str) }; |
|
0
|
|
|
|
|
0
|
|
14
|
0
|
0
|
0
|
|
|
0
|
warn $@ and return undef if $@; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
0
|
return $dom; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub register { |
20
|
75
|
|
|
75
|
0
|
213
|
my ($class, $self, $app, $conf) = @_; |
21
|
|
|
|
|
|
|
|
22
|
75
|
|
|
|
|
245
|
return; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |