line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::ListScraper::Dust; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
157
|
|
4
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
104
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
21
|
use Class::Generate qw(class); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
1240
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
class 'HTML::ListScraper::Alignment' => { |
9
|
|
|
|
|
|
|
score => { type => '$', required => 1 }, |
10
|
|
|
|
|
|
|
positions => { type => '@', required => 1 } |
11
|
|
|
|
|
|
|
}; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
57
|
|
|
57
|
0
|
111
|
my $class = shift; |
15
|
57
|
|
|
|
|
162
|
my $self = { align => [] }; |
16
|
57
|
|
|
|
|
114
|
bless $self, $class; |
17
|
|
|
|
|
|
|
|
18
|
57
|
|
|
|
|
209
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub add_alignment { |
22
|
29
|
|
|
29
|
0
|
58
|
my ($self, $score, $pos) = @_; |
23
|
|
|
|
|
|
|
|
24
|
29
|
|
|
|
|
50
|
push @{$self->{align}}, |
|
29
|
|
|
|
|
786
|
|
25
|
|
|
|
|
|
|
HTML::ListScraper::Alignment->new(score => $score, |
26
|
|
|
|
|
|
|
positions => $pos); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub add_alignments_before { |
30
|
25
|
|
|
25
|
0
|
54
|
my ($self, $alignments) = @_; |
31
|
|
|
|
|
|
|
|
32
|
25
|
|
|
|
|
42
|
unshift @{$self->{align}}, @$alignments; |
|
25
|
|
|
|
|
605
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub add_alignments_after { |
36
|
16
|
|
|
16
|
0
|
44
|
my ($self, $alignments) = @_; |
37
|
|
|
|
|
|
|
|
38
|
16
|
|
|
|
|
30
|
push @{$self->{align}}, @$alignments; |
|
16
|
|
|
|
|
385
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub get_alignments { |
42
|
57
|
|
|
57
|
0
|
106
|
my $self = shift; |
43
|
|
|
|
|
|
|
|
44
|
57
|
100
|
|
|
|
302
|
return wantarray ? @{$self->{align}} : $self->{align}; |
|
16
|
|
|
|
|
79
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |