line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Exporter::Constants; |
2
|
3
|
|
|
3
|
|
98004
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
96
|
|
3
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
79
|
|
4
|
3
|
|
|
3
|
|
74
|
use 5.010001; |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
452
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
15
|
use Exporter; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
146
|
|
8
|
3
|
|
|
3
|
|
1121
|
use parent qw/Exporter/; |
|
3
|
|
|
|
|
426
|
|
|
3
|
|
|
|
|
22
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
11
|
3
|
|
|
3
|
|
32
|
my $class = shift; |
12
|
3
|
|
|
|
|
7
|
my $pkg = caller(0); |
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
|
|
23
|
while (@_) { |
15
|
4
|
|
|
|
|
11
|
my ($array, $stuff) = splice @_, 0, 2; |
16
|
4
|
|
|
|
|
8
|
_declare_constant($pkg, $array, $stuff); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _declare_constant { |
21
|
4
|
|
|
4
|
|
5
|
my ($pkg, $array, $stuff) = @_; |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
3
|
|
477
|
no strict 'refs'; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
327
|
|
24
|
4
|
|
|
|
|
20
|
while (my ($k, $v) = each %$stuff) { |
25
|
8
|
|
|
0
|
|
67
|
*{"$pkg\::$k"} = sub () { $v }; |
|
8
|
|
|
|
|
39
|
|
|
0
|
|
|
|
|
0
|
|
26
|
8
|
|
|
|
|
91
|
unshift @$array, $k; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
__END__ |