line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::Vparam::DOM; |
2
|
73
|
|
|
73
|
|
2874202
|
use Mojo::Base -strict; |
|
73
|
|
|
|
|
119802
|
|
|
73
|
|
|
|
|
421
|
|
3
|
73
|
|
|
73
|
|
8099
|
use Mojolicious::Plugin::Vparam::Common; |
|
73
|
|
|
|
|
139
|
|
|
73
|
|
|
|
|
3243
|
|
4
|
|
|
|
|
|
|
|
5
|
73
|
|
|
73
|
|
720
|
use Mojo::DOM; |
|
73
|
|
|
|
|
9380
|
|
|
73
|
|
|
|
|
11244
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub parse_dom($) { |
8
|
4
|
|
|
4
|
0
|
120
|
my $str = shift; |
9
|
4
|
50
|
|
|
|
8
|
return undef unless defined $str; |
10
|
4
|
100
|
|
|
|
13
|
return undef unless length $str; |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
|
|
4
|
my $dom = eval { Mojo::DOM->new( $str ); }; |
|
3
|
|
|
|
|
16
|
|
13
|
3
|
50
|
0
|
|
|
1420
|
warn $@ and return undef if $@; |
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
|
|
9
|
return $dom; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub register { |
19
|
75
|
|
|
75
|
0
|
214
|
my ($class, $self, $app, $conf) = @_; |
20
|
|
|
|
|
|
|
|
21
|
75
|
|
|
|
|
220
|
return; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |