line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id$ |
2
|
|
|
|
|
|
|
# $Source$ |
3
|
|
|
|
|
|
|
# $Author$ |
4
|
|
|
|
|
|
|
# $HeadURL$ |
5
|
|
|
|
|
|
|
# $Revision$ |
6
|
|
|
|
|
|
|
# $Date$ |
7
|
|
|
|
|
|
|
package Class::Dot::Devel::Sub::Name; |
8
|
|
|
|
|
|
|
|
9
|
16
|
|
|
16
|
|
83
|
use strict; |
|
16
|
|
|
|
|
28
|
|
|
16
|
|
|
|
|
509
|
|
10
|
16
|
|
|
16
|
|
81
|
use warnings; |
|
16
|
|
|
|
|
28
|
|
|
16
|
|
|
|
|
403
|
|
11
|
16
|
|
|
16
|
|
79
|
use version; |
|
16
|
|
|
|
|
32
|
|
|
16
|
|
|
|
|
84
|
|
12
|
16
|
|
|
16
|
|
1181
|
use 5.00600; |
|
16
|
|
|
|
|
283
|
|
|
16
|
|
|
|
|
717
|
|
13
|
|
|
|
|
|
|
|
14
|
16
|
|
|
16
|
|
1505
|
use English qw(-no_match_vars); |
|
16
|
|
|
|
|
5439
|
|
|
16
|
|
|
|
|
133
|
|
15
|
16
|
|
|
|
|
130
|
use Class::Dot::Meta::Method qw( |
16
|
|
|
|
|
|
|
install_sub_from_class |
17
|
16
|
|
|
16
|
|
19243
|
); |
|
16
|
|
|
|
|
39
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $VERSION = qv('2.0.0_15'); |
20
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:ASKSH'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
BEGIN { |
23
|
16
|
|
|
16
|
|
978
|
eval 'require Sub::Name'; ## no critic |
24
|
16
|
50
|
|
|
|
15038
|
if ($EVAL_ERROR) { |
25
|
|
|
|
|
|
|
*subname = sub { |
26
|
0
|
|
|
|
|
0
|
my ($sub_name, $sub_coderef) = @_; |
27
|
0
|
|
|
|
|
0
|
return $sub_coderef; |
28
|
0
|
|
|
|
|
0
|
}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
else { |
31
|
16
|
|
|
|
|
1532
|
Sub::Name->import('subname'); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my @ALWAYS_EXPORT = qw(subname); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub import { |
38
|
126
|
|
|
126
|
|
326
|
my ($this_class) = @_; |
39
|
126
|
|
|
|
|
334
|
my $caller_class = caller 0; |
40
|
|
|
|
|
|
|
|
41
|
16
|
|
|
16
|
|
129
|
no strict 'refs'; ## no critic |
|
16
|
|
|
|
|
31
|
|
|
16
|
|
|
|
|
1343
|
|
42
|
126
|
|
|
|
|
1000
|
for my $sub (@ALWAYS_EXPORT) { |
43
|
126
|
|
|
|
|
423
|
install_sub_from_class($this_class, $sub => $caller_class); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
126
|
|
|
|
|
32795
|
return; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |