line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Range::Compare::Stream::Iterator::Compare::Base; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
32268
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
150
|
|
4
|
6
|
|
|
6
|
|
28
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
181
|
|
5
|
6
|
|
|
6
|
|
31
|
use Carp qw(croak); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
305
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
3287
|
use Data::Range::Compare::Stream::Iterator::Compare::Result; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
176
|
|
8
|
6
|
|
|
6
|
|
33
|
use constant RESULT_CLASS=>'Data::Range::Compare::Stream::Iterator::Compare::Result'; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
333
|
|
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
28
|
use base qw(Data::Range::Compare::Stream::Iterator::Base); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
4848
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
46
|
|
|
46
|
0
|
6320
|
my ($class,%args)=@_; |
14
|
46
|
|
|
|
|
325
|
$class->SUPER::new(column_map=>[],root_ids=>[],dead_columns=>[],last_row=>0,iterators_empty=>0,prepared=>0,consolidateors=>[],raw_row=>[],%args); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
46
|
|
|
46
|
0
|
162
|
sub on_dead_iterator { 1 } |
18
|
|
|
|
|
|
|
|
19
|
691
|
|
|
691
|
0
|
2545
|
sub prepared { $_[0]->{prepared} } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub add_consolidator { |
22
|
96
|
|
|
96
|
1
|
419
|
my ($self,$consolidator)=@_; |
23
|
|
|
|
|
|
|
|
24
|
96
|
50
|
|
|
|
220
|
croak "Fatal error, cannot add new objects once the consolidator has been called!!" if $self->prepared; |
25
|
96
|
|
|
|
|
144
|
push @{$self->{consolidateors}},$consolidator; |
|
96
|
|
|
|
|
206
|
|
26
|
96
|
|
|
|
|
132
|
my $id=$#{$self->{consolidateors}}; |
|
96
|
|
|
|
|
188
|
|
27
|
|
|
|
|
|
|
|
28
|
96
|
|
|
|
|
324
|
$consolidator->set_column_id($id); |
29
|
96
|
|
|
|
|
351
|
return $id |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub insert_consolidator { |
33
|
28
|
|
|
28
|
1
|
443
|
my ($self,$consolidator)=@_; |
34
|
|
|
|
|
|
|
|
35
|
28
|
|
|
|
|
43
|
push @{$self->{consolidateors}},$consolidator; |
|
28
|
|
|
|
|
71
|
|
36
|
28
|
|
|
|
|
45
|
my $id=$#{$self->{consolidateors}}; |
|
28
|
|
|
|
|
54
|
|
37
|
|
|
|
|
|
|
|
38
|
28
|
|
|
|
|
101
|
$consolidator->set_column_id($id); |
39
|
|
|
|
|
|
|
|
40
|
28
|
100
|
|
|
|
73
|
if($self->prepared) { |
41
|
8
|
50
|
|
|
|
36
|
croak "cannot insert empty consolidators!" unless $consolidator->has_next; |
42
|
8
|
|
|
|
|
29
|
$self->{raw_row}->[$id]=$consolidator->get_next; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
28
|
|
|
|
|
88
|
return $id; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub get_iterator_by_id { |
49
|
82
|
|
|
82
|
1
|
1811
|
my ($self,$id)=@_; |
50
|
82
|
50
|
33
|
|
|
258
|
croak "id out of bounds" if !defined($id) or $id>$#{$_[0]->{consolidateors}} or $id<0; |
|
82
|
|
33
|
|
|
594
|
|
51
|
82
|
|
|
|
|
414
|
return $self->{consolidateors}->[$id]; |
52
|
|
|
|
|
|
|
} |
53
|
1527
|
|
|
1527
|
1
|
5879
|
sub get_column_count_human_readable { 1 + $_[0]->get_column_count} |
54
|
|
|
|
|
|
|
|
55
|
1587
|
|
|
1587
|
1
|
9793
|
sub get_column_count { $#{$_[0]->{consolidateors}} } |
|
1587
|
|
|
|
|
7262
|
|
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
0
|
0
|
0
|
sub get_consolidateors { @{$_[0]->{consolidateors}} } |
|
0
|
|
|
|
|
0
|
|
58
|
|
|
|
|
|
|
|
59
|
308
|
|
|
308
|
1
|
819
|
sub get_current_row { $_[0]->{current_row} } |
60
|
|
|
|
|
|
|
|
61
|
6
|
|
|
6
|
1
|
31
|
sub iterators_empty { $_[0]->{iterators_empty} } |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |