| blib/lib/HH.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 13 | 13 | 100.0 |
| branch | 1 | 2 | 50.0 |
| condition | n/a | ||
| subroutine | 3 | 3 | 100.0 |
| pod | n/a | ||
| total | 17 | 18 | 94.4 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package HH; | ||||||
| 2 | 1 | 1 | 4 | use strict; | |||
| 1 | 2 | ||||||
| 1 | 22 | ||||||
| 3 | 1 | 1 | 3 | use warnings; | |||
| 1 | 1 | ||||||
| 1 | 133 | ||||||
| 4 | |||||||
| 5 | our $VERSION = '0.001'; | ||||||
| 6 | |||||||
| 7 | require Carp; | ||||||
| 8 | |||||||
| 9 | our $AUTOLOAD; | ||||||
| 10 | |||||||
| 11 | sub AUTOLOAD { | ||||||
| 12 | 10 | 10 | 7824 | my ($in, @args) = @_; | |||
| 13 | 10 | 13 | my $meth = $AUTOLOAD; | ||||
| 14 | 10 | 42 | $meth =~ s/^.*:://g; | ||||
| 15 | |||||||
| 16 | 10 | 15 | my %h; | ||||
| 17 | 10 | 36 | my ($pkg, $file, $line) = caller(0); | ||||
| 18 | 10 | 50 | 1132 | eval qq[ | |||
| 19 | package $pkg; | ||||||
| 20 | #line $line "$file (Via $AUTOLOAD\())" | ||||||
| 21 | %h = \$in->\$meth(\@args ? \@args : ()); | ||||||
| 22 | 1; | ||||||
| 23 | ] or die $@; | ||||||
| 24 | |||||||
| 25 | 10 | 257 | return ($meth => \%h); | ||||
| 26 | } | ||||||
| 27 | |||||||
| 28 | 1; |