line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Enbld::HTML; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
589
|
use strict; |
|
4
|
|
|
|
|
43
|
|
|
4
|
|
|
|
|
172
|
|
4
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
982
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
37
|
|
|
37
|
0
|
613
|
my ( $class, $html ) = @_; |
8
|
|
|
|
|
|
|
|
9
|
37
|
|
|
|
|
105
|
my $self = { |
10
|
|
|
|
|
|
|
html => $html, |
11
|
|
|
|
|
|
|
}; |
12
|
|
|
|
|
|
|
|
13
|
37
|
|
|
|
|
145
|
return bless $self, $class; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub parse_version { |
17
|
37
|
|
|
37
|
0
|
100
|
my ( $self, $parser, $version_form ) = @_; |
18
|
|
|
|
|
|
|
|
19
|
37
|
|
|
|
|
120
|
my $filenames = $self->extract( $parser ); |
20
|
|
|
|
|
|
|
|
21
|
37
|
|
|
|
|
53
|
my %list; |
22
|
|
|
|
|
|
|
|
23
|
37
|
|
|
|
|
57
|
foreach my $filename ( @{ $filenames } ) { |
|
37
|
|
|
|
|
126
|
|
24
|
71
|
|
|
|
|
328
|
while ( $filename =~ /$version_form/g ) { |
25
|
71
|
|
|
|
|
376
|
$list{$&}++; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
37
|
100
|
|
|
|
196
|
return unless ( keys %list ); |
30
|
|
|
|
|
|
|
|
31
|
36
|
|
|
|
|
101
|
my @versions = keys %list; |
32
|
|
|
|
|
|
|
|
33
|
36
|
|
|
|
|
275
|
return \@versions; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub extract { |
37
|
37
|
|
|
37
|
0
|
95
|
my ( $self, $parser ) = @_; |
38
|
|
|
|
|
|
|
|
39
|
37
|
|
|
|
|
63
|
my @candidate; |
40
|
37
|
|
|
|
|
411
|
while( $self->{html} =~ /$parser/g ) { |
41
|
71
|
|
|
|
|
448
|
push @candidate, $&; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
37
|
|
|
|
|
134
|
return \@candidate; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |