| blib/lib/HTML/Zoom/ArrayStream.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 12 | 12 | 100.0 |
| branch | 2 | 2 | 100.0 |
| condition | n/a | ||
| subroutine | 4 | 4 | 100.0 |
| pod | 0 | 1 | 0.0 |
| total | 18 | 19 | 94.7 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package HTML::Zoom::ArrayStream; | ||||||
| 2 | |||||||
| 3 | 13 | 13 | 70 | use strictures 1; | |||
| 13 | 88 | ||||||
| 13 | 293 | ||||||
| 4 | 13 | 13 | 1098 | use base qw(HTML::Zoom::StreamBase); | |||
| 13 | 26 | ||||||
| 13 | 3124 | ||||||
| 5 | |||||||
| 6 | sub new { | ||||||
| 7 | 388 | 388 | 0 | 688 | my ($class, $args) = @_; | ||
| 8 | 388 | 3428 | bless( | ||||
| 9 | 388 | 602 | { _zconfig => $args->{zconfig}, _array => [ @{$args->{array}} ] }, | ||||
| 10 | $class | ||||||
| 11 | ); | ||||||
| 12 | } | ||||||
| 13 | |||||||
| 14 | sub _next { | ||||||
| 15 | 2027 | 2027 | 3561 | my $ary = $_[0]->{_array}; | |||
| 16 | 2027 | 100 | 5240 | return unless @$ary; | |||
| 17 | 1641 | 7605 | return shift @$ary; | ||||
| 18 | } | ||||||
| 19 | |||||||
| 20 | 1; |