blib/lib/HTML/Feature/Result.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 14 | 92.8 |
branch | 1 | 2 | 50.0 |
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 20 | 22 | 90.9 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package HTML::Feature::Result; | ||||||
2 | 1 | 1 | 652 | use strict; | |||
1 | 2 | ||||||
1 | 31 | ||||||
3 | 1 | 1 | 6 | use warnings; | |||
1 | 2 | ||||||
1 | 26 | ||||||
4 | 1 | 1 | 5 | use base qw(HTML::Feature::Base); | |||
1 | 2 | ||||||
1 | 667 | ||||||
5 | |||||||
6 | __PACKAGE__->mk_accessors($_) for qw(text title desc element root); | ||||||
7 | |||||||
8 | sub element_delete { | ||||||
9 | 1 | 1 | 1 | 2 | my $self = shift; | ||
10 | 1 | 50 | 5 | if ( $self->root ) { | |||
11 | 0 | 0 | $self->root->delete(); | ||||
12 | } | ||||||
13 | } | ||||||
14 | |||||||
15 | sub DESTROY { | ||||||
16 | 1 | 1 | 2 | my $self = shift; | |||
17 | 1 | 4 | $self->element_delete(); | ||||
18 | } | ||||||
19 | 1; | ||||||
20 | __END__ |