| blib/lib/Text/Pipe/Prepend.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 12 | 12 | 100.0 |
| branch | 2 | 2 | 100.0 |
| condition | n/a | ||
| subroutine | 4 | 4 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 19 | 19 | 100.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Text::Pipe::Prepend; | ||||||
| 2 | |||||||
| 3 | 1 | 1 | 7 | use warnings; | |||
| 1 | 2 | ||||||
| 1 | 35 | ||||||
| 4 | 1 | 1 | 6 | use strict; | |||
| 1 | 1 | ||||||
| 1 | 80 | ||||||
| 5 | |||||||
| 6 | |||||||
| 7 | our $VERSION = '0.10'; | ||||||
| 8 | |||||||
| 9 | |||||||
| 10 | 1 | 1 | 7 | use base 'Text::Pipe::Base'; | |||
| 1 | 3 | ||||||
| 1 | 201 | ||||||
| 11 | |||||||
| 12 | |||||||
| 13 | __PACKAGE__->mk_scalar_accessors(qw(text)); | ||||||
| 14 | |||||||
| 15 | |||||||
| 16 | sub filter_single { | ||||||
| 17 | 4 | 4 | 1 | 8 | my ($self, $input) = @_; | ||
| 18 | 4 | 100 | 13 | return $input unless defined $self->text; | |||
| 19 | 2 | 20 | $self->text . $input; | ||||
| 20 | } | ||||||
| 21 | |||||||
| 22 | |||||||
| 23 | 1; | ||||||
| 24 | |||||||
| 25 | |||||||
| 26 | __END__ |