| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Data::TableReader::Iterator; |
|
2
|
|
|
|
|
|
|
$Data::TableReader::Iterator::VERSION = '0.010'; |
|
3
|
7
|
|
|
7
|
|
54
|
use strict; |
|
|
7
|
|
|
|
|
17
|
|
|
|
7
|
|
|
|
|
249
|
|
|
4
|
7
|
|
|
7
|
|
75
|
use warnings; |
|
|
7
|
|
|
|
|
42
|
|
|
|
7
|
|
|
|
|
207
|
|
|
5
|
7
|
|
|
7
|
|
38
|
use Try::Tiny; |
|
|
7
|
|
|
|
|
14
|
|
|
|
7
|
|
|
|
|
467
|
|
|
6
|
7
|
|
|
7
|
|
50
|
use Carp; |
|
|
7
|
|
|
|
|
22
|
|
|
|
7
|
|
|
|
|
460
|
|
|
7
|
7
|
|
|
7
|
|
59
|
use Scalar::Util 'refaddr'; |
|
|
7
|
|
|
|
|
12
|
|
|
|
7
|
|
|
|
|
1920
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Base class for iterators (blessed coderefs) |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our %_iterator_fields; |
|
13
|
|
|
|
|
|
|
sub new { |
|
14
|
46
|
|
|
46
|
1
|
133
|
my ($class, $sub, $fields)= @_; |
|
15
|
46
|
50
|
33
|
|
|
322
|
ref $sub eq 'CODE' and ref $fields eq 'HASH' |
|
16
|
|
|
|
|
|
|
or die "Expected new(CODEREF, HASHREF)"; |
|
17
|
46
|
|
|
|
|
210
|
$_iterator_fields{refaddr $sub}= $fields; |
|
18
|
46
|
|
|
|
|
226
|
return bless $sub, $class; |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _fields { |
|
22
|
59
|
|
|
59
|
|
239
|
$_iterator_fields{refaddr shift}; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub DESTROY { |
|
26
|
46
|
|
|
46
|
|
16017
|
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
|
42
|
undef; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |