line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::TableReader::Iterator; |
2
|
7
|
|
|
7
|
|
70
|
use strict; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
195
|
|
3
|
7
|
|
|
7
|
|
33
|
use warnings; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
158
|
|
4
|
7
|
|
|
7
|
|
33
|
use Try::Tiny; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
384
|
|
5
|
7
|
|
|
7
|
|
39
|
use Carp; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
374
|
|
6
|
7
|
|
|
7
|
|
44
|
use Scalar::Util 'refaddr'; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
1764
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: Base class for iterators (blessed coderefs) |
9
|
|
|
|
|
|
|
our $VERSION = '0.011'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our %_iterator_fields; |
13
|
|
|
|
|
|
|
sub new { |
14
|
48
|
|
|
48
|
1
|
112
|
my ($class, $sub, $fields)= @_; |
15
|
48
|
50
|
33
|
|
|
279
|
ref $sub eq 'CODE' and ref $fields eq 'HASH' |
16
|
|
|
|
|
|
|
or die "Expected new(CODEREF, HASHREF)"; |
17
|
48
|
|
|
|
|
185
|
$_iterator_fields{refaddr $sub}= $fields; |
18
|
48
|
|
|
|
|
236
|
return bless $sub, $class; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _fields { |
22
|
61
|
|
|
61
|
|
205
|
$_iterator_fields{refaddr shift}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub DESTROY { |
26
|
48
|
|
|
48
|
|
14311
|
delete $_iterator_fields{refaddr shift}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub progress { |
30
|
0
|
|
|
0
|
1
|
0
|
undef; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub tell { |
34
|
0
|
|
|
0
|
1
|
0
|
undef; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub seek { |
38
|
0
|
|
|
0
|
1
|
0
|
undef; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub next_dataset { |
42
|
11
|
|
|
11
|
1
|
38
|
undef; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |