line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Range::Compare::Stream::Iterator::Stack; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
857
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
72
|
|
4
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
86
|
|
5
|
3
|
|
|
3
|
|
13
|
use base qw(Data::Range::Compare::Stream::Iterator::Base); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
837
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
14
|
|
|
14
|
0
|
468
|
my ($class,%args)=@_; |
9
|
14
|
|
|
|
|
88
|
my $self=$class->SUPER::new(stack=>[],%args); |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub stack_push { |
13
|
3
|
|
|
3
|
1
|
8
|
my ($self,$it)=@_; |
14
|
3
|
|
|
|
|
5
|
push @{$self->{stack}},$it; |
|
3
|
|
|
|
|
10
|
|
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub has_next { |
18
|
8264
|
|
|
8264
|
0
|
12168
|
my ($self)=@_; |
19
|
8264
|
|
|
|
|
12302
|
my $stack=$self->{stack}; |
20
|
8264
|
|
|
|
|
19057
|
while($#$stack!=-1) { |
21
|
8270
|
100
|
|
|
|
21795
|
return 1 if $stack->[0]->has_next; |
22
|
22
|
|
|
|
|
80
|
shift @$stack; |
23
|
|
|
|
|
|
|
} |
24
|
16
|
|
|
|
|
63
|
return 0; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
8247
|
|
|
8247
|
1
|
23872
|
sub get_next { $_[0]->{stack}->[0]->get_next } |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |