| 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 | 14 | 14 | 77 | use strictures 1; | |||
| 14 | 82 | ||||||
| 14 | 361 | ||||||
| 4 | 14 | 14 | 920 | use base qw(HTML::Zoom::StreamBase); | |||
| 14 | 30 | ||||||
| 14 | 2575 | ||||||
| 5 | |||||||
| 6 | sub new { | ||||||
| 7 | 407 | 407 | 0 | 737 | my ($class, $args) = @_; | ||
| 8 | 407 | 3030 | bless( | ||||
| 9 | 407 | 642 | { _zconfig => $args->{zconfig}, _array => [ @{$args->{array}} ] }, | ||||
| 10 | $class | ||||||
| 11 | ); | ||||||
| 12 | } | ||||||
| 13 | |||||||
| 14 | sub _next { | ||||||
| 15 | 2195 | 2195 | 3594 | my $ary = $_[0]->{_array}; | |||
| 16 | 2195 | 100 | 5668 | return unless @$ary; | |||
| 17 | 1792 | 13464 | return shift @$ary; | ||||
| 18 | } | ||||||
| 19 | |||||||
| 20 | 1; |