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