| blib/lib/ReleaseAction.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 15 | 15 | 100.0 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 7 | 7 | 100.0 |
| pod | 0 | 3 | 0.0 |
| total | 22 | 25 | 88.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package ReleaseAction; | ||||||
| 2 | 1 | 1 | 1139 | use Exporter; | |||
| 1 | 2 | ||||||
| 1 | 53 | ||||||
| 3 | @ISA = 'Exporter'; | ||||||
| 4 | @EXPORT_OK = 'on_release'; | ||||||
| 5 | $VERSION = 0.07; | ||||||
| 6 | 1 | 1 | 5 | use strict; | |||
| 1 | 1 | ||||||
| 1 | 170 | ||||||
| 7 | |||||||
| 8 | sub DESTROY { | ||||||
| 9 | 3 | 3 | 447 | my ($self, @args) = @{shift(@_)}; | |||
| 3 | 11 | ||||||
| 10 | 3 | 9 | $self->(@args); | ||||
| 11 | } | ||||||
| 12 | |||||||
| 13 | sub cancel { | ||||||
| 14 | 1 | 1 | 0 | 4 | my $self = shift; | ||
| 15 | 1 | 1 | 6 | @$self = sub {}; | |||
| 1 | 3 | ||||||
| 16 | } | ||||||
| 17 | |||||||
| 18 | sub new { | ||||||
| 19 | 3 | 3 | 0 | 569 | my $class = shift; | ||
| 20 | 3 | 9 | bless [@_], $class; | ||||
| 21 | } | ||||||
| 22 | |||||||
| 23 | sub on_release (&@) { | ||||||
| 24 | 2 | 2 | 0 | 499 | __PACKAGE__->new(@_); | ||
| 25 | } | ||||||
| 26 | |||||||
| 27 | 1; | ||||||
| 28 | |||||||
| 29 | __END__ |