line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::New::Meta;
|
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
21
|
use strict;
|
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
161
|
|
4
|
6
|
|
|
6
|
|
22
|
use warnings;
|
|
6
|
|
|
|
|
5
|
|
|
6
|
|
|
|
|
115
|
|
5
|
6
|
|
|
6
|
|
48
|
use Carp;
|
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
254
|
|
6
|
6
|
|
|
6
|
|
1274
|
use Sub::Install 'reinstall_sub';
|
|
6
|
|
|
|
|
3682
|
|
|
6
|
|
|
|
|
24
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $meta;
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import {
|
11
|
21
|
|
|
21
|
|
288
|
my $class = shift;
|
12
|
21
|
|
|
|
|
31
|
my $caller = caller;
|
13
|
|
|
|
|
|
|
|
14
|
21
|
|
|
|
|
29
|
foreach my $type (qw( methods functions )) {
|
15
|
|
|
|
|
|
|
reinstall_sub({
|
16
|
|
|
|
|
|
|
as => $type,
|
17
|
|
|
|
|
|
|
into => $caller,
|
18
|
|
|
|
|
|
|
code => sub ($) {
|
19
|
26
|
|
|
26
|
|
36
|
my $href = shift;
|
20
|
26
|
|
|
|
|
21
|
foreach my $name (keys %{ $href }) {
|
|
26
|
|
|
|
|
69
|
|
21
|
83
|
|
|
|
|
154
|
$meta->{$caller}->{$name} = $href->{$name};
|
22
|
|
|
|
|
|
|
}
|
23
|
|
|
|
|
|
|
}
|
24
|
42
|
|
|
|
|
991
|
});
|
25
|
|
|
|
|
|
|
}
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
reinstall_sub({
|
28
|
|
|
|
|
|
|
as => 'import',
|
29
|
|
|
|
|
|
|
into => $caller,
|
30
|
|
|
|
|
|
|
code => sub {
|
31
|
141
|
|
|
141
|
|
2121
|
my $class = shift;
|
32
|
141
|
|
|
|
|
197
|
my $caller = caller;
|
33
|
|
|
|
|
|
|
|
34
|
141
|
50
|
|
|
|
292
|
return if $caller eq 'main';
|
35
|
141
|
100
|
|
|
|
371
|
return if $caller =~ /^Test::/;
|
36
|
|
|
|
|
|
|
|
37
|
132
|
|
|
|
|
192
|
my $my_meta = $meta->{$class};
|
38
|
132
|
|
|
|
|
110
|
foreach my $name (keys %{ $my_meta }) {
|
|
132
|
|
|
|
|
349
|
|
39
|
585
|
|
|
|
|
14997
|
reinstall_sub({
|
40
|
|
|
|
|
|
|
as => $name,
|
41
|
|
|
|
|
|
|
into => $caller,
|
42
|
|
|
|
|
|
|
code => $my_meta->{$name},
|
43
|
|
|
|
|
|
|
});
|
44
|
|
|
|
|
|
|
}
|
45
|
|
|
|
|
|
|
}
|
46
|
21
|
|
|
|
|
725
|
});
|
47
|
|
|
|
|
|
|
}
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1;
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__
|