| lib/Module/New/Files.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 13 | 16 | 81.2 |
| branch | 1 | 2 | 50.0 |
| condition | n/a | ||
| subroutine | 5 | 6 | 83.3 |
| pod | 4 | 4 | 100.0 |
| total | 23 | 28 | 82.1 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Module::New::Files; | ||||||
| 2 | |||||||
| 3 | 6 | 6 | 1129 | use strict; | |||
| 6 | 8 | ||||||
| 6 | 171 | ||||||
| 4 | 6 | 6 | 24 | use warnings; | |||
| 6 | 7 | ||||||
| 6 | 552 | ||||||
| 5 | |||||||
| 6 | 14 | 14 | 1 | 83 | sub new { bless [], shift; } | ||
| 7 | |||||||
| 8 | sub add { | ||||||
| 9 | 29 | 29 | 1 | 27 | my $self = shift; | ||
| 10 | 29 | 50 | 51 | push @{ $self }, @_ if @_; | |||
| 29 | 101 | ||||||
| 11 | } | ||||||
| 12 | |||||||
| 13 | sub next { | ||||||
| 14 | 69 | 69 | 1 | 80 | my $self = shift; | ||
| 15 | 69 | 58 | shift @{ $self }; | ||||
| 69 | 330 | ||||||
| 16 | } | ||||||
| 17 | |||||||
| 18 | sub clear { | ||||||
| 19 | 0 | 0 | 1 | my $self = shift; | |||
| 20 | 0 | @{ $self } = []; | |||||
| 0 | |||||||
| 21 | } | ||||||
| 22 | |||||||
| 23 | 1; | ||||||
| 24 | |||||||
| 25 | __END__ |