line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::New::Meta;
|
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
21
|
use strict;
|
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
168
|
|
4
|
6
|
|
|
6
|
|
24
|
use warnings;
|
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
146
|
|
5
|
6
|
|
|
6
|
|
25
|
use Carp;
|
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
257
|
|
6
|
6
|
|
|
6
|
|
1456
|
use Sub::Install 'reinstall_sub';
|
|
6
|
|
|
|
|
4329
|
|
|
6
|
|
|
|
|
25
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $meta;
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import {
|
11
|
21
|
|
|
21
|
|
545
|
my $class = shift;
|
12
|
21
|
|
|
|
|
39
|
my $caller = caller;
|
13
|
|
|
|
|
|
|
|
14
|
21
|
|
|
|
|
42
|
foreach my $type (qw( methods functions )) {
|
15
|
|
|
|
|
|
|
reinstall_sub({
|
16
|
|
|
|
|
|
|
as => $type,
|
17
|
|
|
|
|
|
|
into => $caller,
|
18
|
|
|
|
|
|
|
code => sub ($) {
|
19
|
26
|
|
|
26
|
|
42
|
my $href = shift;
|
20
|
26
|
|
|
|
|
30
|
foreach my $name (keys %{ $href }) {
|
|
26
|
|
|
|
|
81
|
|
21
|
83
|
|
|
|
|
157
|
$meta->{$caller}->{$name} = $href->{$name};
|
22
|
|
|
|
|
|
|
}
|
23
|
|
|
|
|
|
|
}
|
24
|
42
|
|
|
|
|
1152
|
});
|
25
|
|
|
|
|
|
|
}
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
reinstall_sub({
|
28
|
|
|
|
|
|
|
as => 'import',
|
29
|
|
|
|
|
|
|
into => $caller,
|
30
|
|
|
|
|
|
|
code => sub {
|
31
|
141
|
|
|
141
|
|
3837
|
my $class = shift;
|
32
|
141
|
|
|
|
|
209
|
my $caller = caller;
|
33
|
|
|
|
|
|
|
|
34
|
141
|
50
|
|
|
|
331
|
return if $caller eq 'main';
|
35
|
141
|
100
|
|
|
|
522
|
return if $caller =~ /^Test::/;
|
36
|
|
|
|
|
|
|
|
37
|
132
|
|
|
|
|
232
|
my $my_meta = $meta->{$class};
|
38
|
132
|
|
|
|
|
123
|
foreach my $name (keys %{ $my_meta }) {
|
|
132
|
|
|
|
|
567
|
|
39
|
585
|
|
|
|
|
15180
|
reinstall_sub({
|
40
|
|
|
|
|
|
|
as => $name,
|
41
|
|
|
|
|
|
|
into => $caller,
|
42
|
|
|
|
|
|
|
code => $my_meta->{$name},
|
43
|
|
|
|
|
|
|
});
|
44
|
|
|
|
|
|
|
}
|
45
|
|
|
|
|
|
|
}
|
46
|
21
|
|
|
|
|
800
|
});
|
47
|
|
|
|
|
|
|
}
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1;
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__
|