blib/lib/Acme/NumericMethod.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 20 | 20 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 7 | 7 | 100.0 |
pod | n/a | ||
total | 27 | 27 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Acme::NumericMethod; | ||||||
2 | 3 | 3 | 143566 | use v5.8.8; | |||
3 | 31 | ||||||
3 | 3 | 3 | 16 | use strict; | |||
3 | 5 | ||||||
3 | 450 | ||||||
4 | our $VERSION='0.05'; | ||||||
5 | 3 | 3 | 1472 | use Lingua::EN::Words2Nums; | |||
3 | 8098 | ||||||
3 | 429 | ||||||
6 | |||||||
7 | sub import { | ||||||
8 | 3 | 3 | 30 | my $package = (caller)[0]; | |||
9 | 3 | 3 | 24 | no strict 'refs'; | |||
3 | 6 | ||||||
3 | 198 | ||||||
10 | 3 | 2924 | *{"${package}::AUTOLOAD"} = sub { | ||||
11 | 3 | 3 | 19 | no strict; | |||
3 | 5 | ||||||
3 | 288 | ||||||
12 | 3 | 3 | 1799 | my $n = $AUTOLOAD; | |||
13 | 3 | 18 | $n =~ s/.*:://; | ||||
14 | 3 | 14 | return words2nums($n); | ||||
15 | 3 | 13 | }; | ||||
16 | } | ||||||
17 | |||||||
18 | 1; | ||||||
19 | __END__ |