line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Dot; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
46271
|
use 5.006; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
79
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
65
|
|
5
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
229
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.10'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my ( $call_pack, $call_pack2 ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
2
|
|
|
2
|
|
17
|
$call_pack = ( caller(0) )[0]; |
13
|
2
|
|
|
|
|
7
|
$call_pack2 = ( caller(1) )[0]; |
14
|
2
|
|
|
|
|
7
|
my $code = "package $call_pack;\n" . <<' END_OF_CODE'; |
15
|
|
|
|
|
|
|
use overload "." => sub { |
16
|
|
|
|
|
|
|
my ( $obj, $stuff ) = @_; |
17
|
|
|
|
|
|
|
@_ = ( $obj, @{ $stuff->{data} } ); |
18
|
|
|
|
|
|
|
goto &{ $obj->can( $stuff->{name} ) }; |
19
|
|
|
|
|
|
|
}, |
20
|
|
|
|
|
|
|
fallback => 1; |
21
|
|
|
|
|
|
|
END_OF_CODE |
22
|
2
|
|
|
2
|
|
3196
|
eval $code; |
|
2
|
|
|
1
|
|
2094
|
|
|
2
|
|
|
|
|
20
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
195
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
CHECK { |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# At this point, everything is ready, and $call_pack2 contains |
28
|
|
|
|
|
|
|
# the calling package's calling package. |
29
|
2
|
|
|
2
|
|
24
|
no strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
139
|
|
30
|
2
|
50
|
|
2
|
|
1835
|
if ($call_pack2) { |
31
|
2
|
|
|
|
|
8
|
my $code = "package $call_pack2;\n" . <<' END_OF_CODE'; |
32
|
|
|
|
|
|
|
*AUTOLOAD = sub { |
33
|
|
|
|
|
|
|
$AUTOLOAD =~ /.*::(.*)/; |
34
|
|
|
|
|
|
|
return if $1 eq "DESTROY"; |
35
|
|
|
|
|
|
|
return { data => \@_, name => $1 }; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
END_OF_CODE |
38
|
2
|
50
|
|
1
|
|
203
|
eval $code; |
|
1
|
|
|
|
|
341
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
69
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
__END__ |