| 1 | package Data::TableReader::Iterator; | ||||||||||||||||||||||||||||
| 2 | 12 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 12 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 12 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 12 | ▶ | use Scalar::Util 'refaddr'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | # ABSTRACT: Base class for iterators (blessed coderefs) | ||||||||||||||||||||||||||||
| 8 | 12 | our $VERSION = '0.023'; # VERSION | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 12 | our %_iterator_fields; | |||||||||||||||||||||||||||
| 12 | 91 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=12.0
Pod
documented
| |||||||||||||||||||||||||||||
| 13 | 91 | my ($class, $sub, $fields)= @_; | |||||||||||||||||||||||||||
| 14 | 91 | ▶ | ref $sub eq 'CODE' and ref $fields eq 'HASH' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $sub eq "CODE" and ref $fields eq "HASH"
MC/DC0%0/2
ref $sub eq "CODE" and ref $fields eq "HASH"
ref $sub eq "CODE"
ref $fields eq "HASH"
Truth table33%1/3
A and B
A= ref $sub eq "CODE"B= ref $fields eq "HASH"
| |||||||||||||||||||||||||||||
| 15 | or croak "Expected new(CODEREF, HASHREF)"; | ||||||||||||||||||||||||||||
| 16 | 91 | $_iterator_fields{refaddr $sub}= $fields; | |||||||||||||||||||||||||||
| 17 | 91 | return bless $sub, $class; | |||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 215 | ▶ | sub _fields { | ||||||||||||||||||||||||||
|
Subroutine
_fields: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 21 | 215 | $_iterator_fields{refaddr shift}; | |||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 89 | ▶ | sub DESTROY { | ||||||||||||||||||||||||||
|
Subroutine
DESTROY: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 25 | 89 | delete $_iterator_fields{refaddr shift}; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 0 | ▶ | sub progress { | ||||||||||||||||||||||||||
|
Subroutine
progress: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 29 | 0 | undef; | |||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 0 | ▶ | sub row { | ||||||||||||||||||||||||||
|
Subroutine
row: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 33 | 0 | croak "Unimplemented"; | |||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 7 | ▶ | sub dataset_idx { | ||||||||||||||||||||||||||
|
Subroutine
dataset_idx: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 37 | 7 | 0 | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 0 | ▶ | sub tell { | ||||||||||||||||||||||||||
|
Subroutine
tell: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 41 | 0 | undef; | |||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 0 | ▶ | sub seek { | ||||||||||||||||||||||||||
|
Subroutine
seek: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 45 | 0 | croak "Unimplemented"; | |||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 11 | ▶ | sub next_dataset { | ||||||||||||||||||||||||||
|
Subroutine
next_dataset: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 49 | 11 | undef; | |||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | 12 | 1; | |||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | __END__ | ||||||||||||||||||||||||||||