line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::New::Meta; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
23
|
use strict; |
|
6
|
|
|
|
|
6
|
|
|
6
|
|
|
|
|
178
|
|
4
|
6
|
|
|
6
|
|
22
|
use warnings; |
|
6
|
|
|
|
|
6
|
|
|
6
|
|
|
|
|
116
|
|
5
|
6
|
|
|
6
|
|
18
|
use Carp; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
309
|
|
6
|
6
|
|
|
6
|
|
1338
|
use Sub::Install 'reinstall_sub'; |
|
6
|
|
|
|
|
3740
|
|
|
6
|
|
|
|
|
28
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $meta; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
11
|
21
|
|
|
21
|
|
544
|
my $class = shift; |
12
|
21
|
|
|
|
|
40
|
my $caller = caller; |
13
|
|
|
|
|
|
|
|
14
|
21
|
|
|
|
|
46
|
foreach my $type (qw( methods functions )) { |
15
|
|
|
|
|
|
|
reinstall_sub({ |
16
|
|
|
|
|
|
|
as => $type, |
17
|
|
|
|
|
|
|
into => $caller, |
18
|
|
|
|
|
|
|
code => sub ($) { |
19
|
26
|
|
|
26
|
|
47
|
my $href = shift; |
20
|
26
|
|
|
|
|
30
|
foreach my $name (keys %{ $href }) { |
|
26
|
|
|
|
|
92
|
|
21
|
83
|
|
|
|
|
167
|
$meta->{$caller}->{$name} = $href->{$name}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
} |
24
|
42
|
|
|
|
|
1308
|
}); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
reinstall_sub({ |
28
|
|
|
|
|
|
|
as => 'import', |
29
|
|
|
|
|
|
|
into => $caller, |
30
|
|
|
|
|
|
|
code => sub { |
31
|
135
|
|
|
135
|
|
2080
|
my $class = shift; |
32
|
135
|
|
|
|
|
277
|
my $caller = caller; |
33
|
|
|
|
|
|
|
|
34
|
135
|
50
|
|
|
|
410
|
return if $caller eq 'main'; |
35
|
135
|
100
|
|
|
|
497
|
return if $caller =~ /^Test::/; |
36
|
|
|
|
|
|
|
|
37
|
126
|
|
|
|
|
283
|
my $my_meta = $meta->{$class}; |
38
|
126
|
|
|
|
|
137
|
foreach my $name (keys %{ $my_meta }) { |
|
126
|
|
|
|
|
448
|
|
39
|
549
|
|
|
|
|
17745
|
reinstall_sub({ |
40
|
|
|
|
|
|
|
as => $name, |
41
|
|
|
|
|
|
|
into => $caller, |
42
|
|
|
|
|
|
|
code => $my_meta->{$name}, |
43
|
|
|
|
|
|
|
}); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
21
|
|
|
|
|
793
|
}); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |