line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package name; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
143343
|
use 5.008; |
|
3
|
|
|
|
|
18
|
|
4
|
3
|
|
|
3
|
|
12
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
65
|
|
5
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
84
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
15
|
use Carp 'croak'; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
166
|
|
8
|
3
|
|
|
3
|
|
432
|
use Sub::Util qw(set_prototype set_subname); |
|
3
|
|
|
|
|
256
|
|
|
3
|
|
|
|
|
391
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.0.0'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub import { |
13
|
9
|
|
|
9
|
|
6801
|
my $me = shift; |
14
|
9
|
100
|
|
|
|
323
|
my $name = shift or croak "$me: no name given"; |
15
|
7
|
|
|
|
|
17
|
my %args = @_; |
16
|
|
|
|
|
|
|
my $alias = $args{alias} |
17
|
7
|
100
|
|
|
|
303
|
or croak "$me: An 'alias' is required with 'use name'"; |
18
|
3
|
|
|
|
|
11
|
my $caller = caller; |
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
3
|
|
18
|
no strict 'refs'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
108
|
|
21
|
3
|
|
|
3
|
|
17
|
no warnings 'redefine'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
291
|
|
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
29
|
*{"${caller}::$name"} = |
24
|
|
|
|
|
|
|
set_subname "${caller}::$name", |
25
|
|
|
|
|
|
|
set_prototype '', |
26
|
|
|
|
|
|
|
sub { |
27
|
2
|
|
|
2
|
|
3064
|
return $alias; |
|
|
|
|
2
|
|
|
|
28
|
3
|
|
|
|
|
34
|
}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; # End of name |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |