line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::dategrep::Iterator::Fh; |
2
|
9
|
|
|
9
|
|
3415
|
use strict; |
|
9
|
|
|
|
|
9
|
|
|
9
|
|
|
|
|
204
|
|
3
|
9
|
|
|
9
|
|
25
|
use warnings; |
|
9
|
|
|
|
|
9
|
|
|
9
|
|
|
|
|
156
|
|
4
|
9
|
|
|
9
|
|
28
|
use Moo; |
|
9
|
|
|
|
|
9
|
|
|
9
|
|
|
|
|
33
|
|
5
|
9
|
|
|
9
|
|
1489
|
use FileHandle; |
|
9
|
|
|
|
|
26
|
|
|
9
|
|
|
|
|
49
|
|
6
|
|
|
|
|
|
|
extends 'App::dategrep::Iterator'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
0
|
4
|
sub can_seek { 0 } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub seek { |
11
|
7
|
|
|
7
|
0
|
15
|
my $self = shift; |
12
|
7
|
|
66
|
|
|
66
|
my $ignore = $self->multiline || $self->skip_unparsable; |
13
|
7
|
|
|
|
|
9
|
while (1) { |
14
|
21
|
|
|
|
|
430
|
my $line = $self->fh->getline; |
15
|
21
|
50
|
|
|
|
1459
|
if ( !$line ) { |
16
|
0
|
|
|
|
|
0
|
$self->eof(1); |
17
|
0
|
|
|
|
|
0
|
return; |
18
|
|
|
|
|
|
|
} |
19
|
21
|
|
|
|
|
114
|
my ( $date, $error ) = $self->to_epoch($line); |
20
|
|
|
|
|
|
|
|
21
|
21
|
100
|
66
|
|
|
4287
|
if ( !$date && $ignore ) { |
|
|
50
|
33
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
22
|
3
|
|
|
|
|
5
|
next; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
elsif ( !$date ) { |
25
|
0
|
|
|
|
|
0
|
die "No date found in line $line"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
elsif ( $date < $self->start ) { |
28
|
11
|
|
|
|
|
16
|
next; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
elsif ( $date >= $self->start && $date < $self->end ) { |
31
|
7
|
|
|
|
|
41
|
$self->next_line($line); |
32
|
7
|
|
|
|
|
22
|
$self->next_date($date); |
33
|
7
|
|
|
|
|
165
|
return; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
else { |
36
|
0
|
|
|
|
|
|
$self->eof(1); |
37
|
0
|
|
|
|
|
|
return; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |