blib/lib/Symbol/Alias.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 15 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | n/a | ||
total | 19 | 19 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Symbol::Alias; | ||||||
2 | 1 | 1 | 20683 | use strict; | |||
1 | 2 | ||||||
1 | 25 | ||||||
3 | 1 | 1 | 5 | use warnings; | |||
1 | 1 | ||||||
1 | 27 | ||||||
4 | |||||||
5 | 1 | 1 | 491 | use Symbol::Methods; | |||
1 | 3 | ||||||
1 | 77 | ||||||
6 | |||||||
7 | sub import { | ||||||
8 | 2 | 2 | 1347 | my $class = shift; | |||
9 | 2 | 11 | my $package = caller; | ||||
10 | |||||||
11 | 2 | 10 | while (@_) { | ||||
12 | 3 | 4 | my $old = shift; | ||||
13 | 3 | 5 | my $new = shift; | ||||
14 | 3 | 17 | $package->symbol::alias($old, $new); | ||||
15 | } | ||||||
16 | } | ||||||
17 | |||||||
18 | 1; | ||||||
19 | |||||||
20 | __END__ |