line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Attribute::Static; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
56284
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
99
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
101
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
2523
|
use Attribute::Handlers; |
|
2
|
|
|
|
|
14305
|
|
|
2
|
|
|
|
|
14
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub UNIVERSAL::Static : ATTR(CODE) { |
11
|
1
|
|
|
1
|
0
|
1575
|
my ($package, $symbol, $referent, $attr, $data, $phase) = @_; |
12
|
1
|
|
|
|
|
2
|
my $meth = *{$symbol}{NAME}; |
|
1
|
|
|
|
|
3
|
|
13
|
2
|
|
|
2
|
|
164
|
no warnings 'redefine'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
236
|
|
14
|
1
|
|
|
|
|
4
|
*{$symbol} = sub { |
15
|
3
|
|
|
3
|
|
1466
|
my $class = $_[0]; |
16
|
3
|
100
|
|
|
|
14
|
if ($class ne $package) { |
17
|
1
|
|
|
|
|
11
|
require Carp; |
18
|
1
|
|
|
|
|
170
|
Carp::croak "$meth() is a static method of $package!"; |
19
|
|
|
|
|
|
|
} |
20
|
2
|
|
|
|
|
9
|
goto &$referent; |
21
|
1
|
|
|
|
|
5
|
}; |
22
|
2
|
|
|
2
|
|
12
|
} |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
__END__ |