line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::Vparam::DOM; |
2
|
72
|
|
|
72
|
|
1876857
|
use Mojo::Base -strict; |
|
72
|
|
|
|
|
8324
|
|
|
72
|
|
|
|
|
578
|
|
3
|
72
|
|
|
72
|
|
8193
|
use Mojolicious::Plugin::Vparam::Common; |
|
72
|
|
|
|
|
172
|
|
|
72
|
|
|
|
|
3720
|
|
4
|
|
|
|
|
|
|
|
5
|
72
|
|
|
72
|
|
927
|
use Mojo::DOM; |
|
72
|
|
|
|
|
8512
|
|
|
72
|
|
|
|
|
10759
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub parse_dom($) { |
8
|
4
|
|
|
4
|
0
|
284
|
my $str = shift; |
9
|
4
|
50
|
|
|
|
24
|
return undef unless defined $str; |
10
|
4
|
100
|
|
|
|
23
|
return undef unless length $str; |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
|
|
11
|
my $dom = eval { Mojo::DOM->new( $str ); }; |
|
3
|
|
|
|
|
30
|
|
13
|
3
|
50
|
0
|
|
|
2875
|
warn $@ and return undef if $@; |
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
|
|
27
|
return $dom; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub register { |
19
|
74
|
|
|
74
|
0
|
260
|
my ($class, $self, $app, $conf) = @_; |
20
|
|
|
|
|
|
|
|
21
|
74
|
|
|
|
|
272
|
return; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |