blib/lib/IO/All/IO.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 7 | 7 | 100.0 |
branch | 4 | 4 | 100.0 |
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 13 | 14 | 92.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package IO::All::IO; | ||||||
2 | 3 | 3 | 17 | use IO::All::Base; | |||
3 | 6 | ||||||
3 | 21 | ||||||
3 | |||||||
4 | has upgrade_methods => ( default => sub { [] } ); | ||||||
5 | |||||||
6 | sub upgrade { | ||||||
7 | 4 | 4 | 0 | 8 | my ($self) = @_; | ||
8 | 4 | 14 | for my $key (keys %$self) { | ||||
9 | 10 | 100 | 43 | next if $key =~ /^_/; | |||
10 | 8 | 100 | 92 | delete $self->{$key} | |||
11 | unless $self->can($key); | ||||||
12 | } | ||||||
13 | } | ||||||
14 | |||||||
15 | 1; |