line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
5
|
|
|
5
|
|
140256
|
use strict; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
162
|
|
2
|
5
|
|
|
5
|
|
24
|
use warnings; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
208
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Package::Anon; |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
5
|
|
|
5
|
|
258
|
$Package::Anon::AUTHORITY = 'cpan:FLORA'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
{ |
9
|
|
|
|
|
|
|
$Package::Anon::VERSION = '0.05'; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
# ABSTRACT: Anonymous packages |
12
|
|
|
|
|
|
|
|
13
|
5
|
|
|
5
|
|
26
|
use XSLoader; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
291
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
XSLoader::load( |
16
|
|
|
|
|
|
|
'Package::Anon', |
17
|
|
|
|
|
|
|
$Package::Anon::{VERSION} ? ${ $Package::Anon::{VERSION} } : (), |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
5
|
|
|
5
|
|
22
|
use Scalar::Util (); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
573
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub add_method { |
24
|
13
|
|
|
13
|
1
|
11529
|
my ($self, $name, $code) = @_; |
25
|
13
|
|
|
|
|
47
|
my $gv = $self->install_glob($name); |
26
|
13
|
|
|
|
|
22
|
*$gv = $code; |
27
|
13
|
|
|
|
|
46
|
return; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub install_glob { |
32
|
13
|
|
|
13
|
1
|
23
|
my ($self, $name) = @_; |
33
|
13
|
|
|
|
|
66
|
my $gv = $self->create_glob($name); |
34
|
13
|
|
|
|
|
56
|
$self->{$name} = *$gv; |
35
|
13
|
|
|
|
|
29
|
return $gv; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |