line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Range::Compare::Stream::Iterator::Base; |
2
|
|
|
|
|
|
|
|
3
|
16
|
|
|
16
|
|
32532
|
use strict; |
|
16
|
|
|
|
|
28
|
|
|
16
|
|
|
|
|
410
|
|
4
|
16
|
|
|
16
|
|
86
|
use warnings; |
|
16
|
|
|
|
|
30
|
|
|
16
|
|
|
|
|
612
|
|
5
|
16
|
|
|
16
|
|
4687
|
use overload '""'=>\&to_string,fallback=>1; |
|
16
|
|
|
|
|
3383
|
|
|
16
|
|
|
|
|
131
|
|
6
|
|
|
|
|
|
|
|
7
|
16
|
|
|
16
|
|
1159
|
use constant NEW_FROM_CLASS=>'Data::Range::Compare::Stream'; |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
17922
|
|
8
|
|
|
|
|
|
|
|
9
|
196
|
|
|
196
|
0
|
524
|
sub NEW_FROM { $_[0]->{NEW_FROM} } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
590
|
|
|
590
|
0
|
2155
|
my ($class,%args)=@_; |
13
|
590
|
|
|
|
|
4039
|
my $self=bless {NEW_FROM=>$class->NEW_FROM_CLASS,%args},$class; |
14
|
|
|
|
|
|
|
|
15
|
590
|
100
|
|
|
|
4216
|
unless(exists $self->{factory_instance}) { |
16
|
360
|
100
|
|
|
|
1331
|
$self->{factory_instance}= exists $self->{new_from} ? $self->{new_from} : $self->NEW_FROM; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
590
|
|
|
|
|
2278
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub create_from_factory { |
23
|
62382
|
|
|
62382
|
0
|
142246
|
my ($self,@args)=@_; |
24
|
|
|
|
|
|
|
|
25
|
62382
|
|
|
|
|
215904
|
my $range=$self->{factory_instance}->factory(@args); |
26
|
|
|
|
|
|
|
|
27
|
62382
|
|
|
|
|
303831
|
return $range; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
33
|
1
|
|
sub on_consolidate { } |
31
|
|
|
|
|
|
|
|
32
|
123147
|
|
|
123147
|
0
|
464471
|
sub has_next { $_[0]->{has_next} } |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
0
|
sub get_next { undef } |
35
|
|
|
|
|
|
|
|
36
|
22
|
|
|
22
|
1
|
1886
|
sub to_string { ref($_[0]) } |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
2
|
1
|
|
sub delete_from_root { } |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
1
|
0
|
sub get_child_column_id { undef } |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
1
|
0
|
sub get_child { undef } |
43
|
|
|
|
|
|
|
|
44
|
235
|
|
|
235
|
1
|
690
|
sub set_column_id { $_[0]->{column_id}=$_[1] } |
45
|
|
|
|
|
|
|
|
46
|
114
|
|
|
114
|
1
|
597
|
sub get_column_id { $_[0]->{column_id} } |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
0
|
1
|
0
|
sub get_root_column_id {$_[0]->get_column_id } |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
0
|
1
|
0
|
sub get_root { $_[0] } |
51
|
|
|
|
|
|
|
|
52
|
82
|
|
|
82
|
0
|
263
|
sub is_child { 0 } |
53
|
0
|
|
|
0
|
0
|
0
|
sub has_child { 0 } |
54
|
0
|
|
|
0
|
0
|
0
|
sub is_root { 1 } |
55
|
0
|
|
|
0
|
0
|
0
|
sub has_root {0} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub result_to_line { |
58
|
53263
|
|
|
53263
|
1
|
74804
|
my ($self,$result)=@_; |
59
|
53263
|
100
|
|
|
|
124315
|
return $self->{result_to_line}->($result) if defined($self->{result_to_line}); |
60
|
|
|
|
|
|
|
|
61
|
53254
|
|
|
|
|
137882
|
my $range=$result->get_common; |
62
|
53254
|
|
|
|
|
142645
|
my $line=$range->range_start_to_string.' '.$range->range_end_to_string."\n"; |
63
|
53254
|
|
|
|
|
193737
|
return $line; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub parse_line { |
67
|
61516
|
|
|
61516
|
1
|
91773
|
my ($self,$line)=@_; |
68
|
61516
|
100
|
|
|
|
139854
|
return $self->{parse_line}->($line) if defined($self->{parse_line}); |
69
|
61507
|
|
|
|
|
75051
|
chomp $line; |
70
|
61507
|
|
|
|
|
327689
|
[split /\s+/,$line]; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
1; |
75
|
|
|
|
|
|
|
|