line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Object::Method; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
176734
|
use strict; |
|
4
|
|
|
|
|
24
|
|
|
4
|
|
|
|
|
101
|
|
4
|
4
|
|
|
4
|
|
15
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
80
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
29
|
use Scalar::Util (); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
118
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
11
|
4
|
|
|
4
|
|
36
|
no strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
685
|
|
12
|
4
|
50
|
|
4
|
|
38
|
if (@_ > 0) { |
13
|
4
|
|
|
|
|
8
|
*{caller() . '::method'} = \&method; |
|
4
|
|
|
|
|
2911
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub method { |
18
|
10
|
|
|
10
|
0
|
10236
|
my ($o, $m, $c) = @_; |
19
|
|
|
|
|
|
|
|
20
|
10
|
|
|
|
|
33
|
my $p = Scalar::Util::blessed($o); |
21
|
10
|
|
|
|
|
31
|
my $id = Scalar::Util::refaddr($o); |
22
|
|
|
|
|
|
|
|
23
|
10
|
100
|
100
|
|
|
65
|
unless ($p =~ /#<(\d+)>$/ and $id == $1) { |
24
|
9
|
|
|
|
|
17
|
my $op = $p; |
25
|
|
|
|
|
|
|
|
26
|
9
|
|
|
|
|
66
|
$p =~ s/(?:#<\d+>)?$/#<$id>/; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# eval "package $p;"; |
29
|
9
|
|
|
|
|
42
|
bless $o, $p; |
30
|
|
|
|
|
|
|
{ |
31
|
4
|
|
|
4
|
|
33
|
no strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
175
|
|
|
9
|
|
|
|
|
12
|
|
32
|
9
|
|
|
|
|
12
|
@{$p . '::ISA'}=($op); |
|
9
|
|
|
|
|
152
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
{ |
37
|
4
|
|
|
4
|
|
20
|
no strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
233
|
|
|
10
|
|
|
|
|
24
|
|
38
|
10
|
|
|
|
|
12
|
*{$p . "::$m"} = $c; |
|
10
|
|
|
|
|
48
|
|
39
|
|
|
|
|
|
|
} |
40
|
10
|
|
|
|
|
28
|
return $o; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |