line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sub::Meta::CreatorFunction; |
2
|
4
|
|
|
4
|
|
418640
|
use 5.010; |
|
4
|
|
|
|
|
28
|
|
3
|
4
|
|
|
4
|
|
19
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
66
|
|
4
|
4
|
|
|
4
|
|
16
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
107
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
1540
|
use Class::Load (); |
|
4
|
|
|
|
|
66734
|
|
|
4
|
|
|
|
|
98
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
1179
|
use Sub::Meta::Library; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
124
|
|
9
|
4
|
|
|
4
|
|
1274
|
use Sub::Meta::Creator; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
646
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @FINDER_CLASSES = ( |
12
|
|
|
|
|
|
|
'Sub::Meta::Finder::FunctionParameters', |
13
|
|
|
|
|
|
|
'Sub::Meta::Finder::SubWrapInType', |
14
|
|
|
|
|
|
|
'Sub::Meta::Finder::Default', |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub find_submeta { |
18
|
23
|
|
|
23
|
1
|
16292
|
my $sub = shift; |
19
|
|
|
|
|
|
|
|
20
|
23
|
100
|
|
|
|
118
|
if (my $submeta = Sub::Meta::Library->get($sub)) { |
21
|
17
|
|
|
|
|
49
|
return $submeta; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
6
|
|
|
|
|
85
|
state $creator = Sub::Meta::Creator->new(finders => finders()); |
25
|
6
|
100
|
|
|
|
32
|
if (my $submeta = $creator->create($sub)) { |
26
|
5
|
|
|
|
|
17
|
return $submeta; |
27
|
|
|
|
|
|
|
} |
28
|
1
|
|
|
|
|
5
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub finders { |
32
|
5
|
|
|
5
|
1
|
3334
|
my @finders; |
33
|
5
|
|
|
|
|
17
|
for my $finder_class (@FINDER_CLASSES) { |
34
|
12
|
100
|
|
|
|
609
|
if (Class::Load::try_load_class($finder_class)) { |
35
|
8
|
|
|
|
|
1755
|
push @finders => $finder_class->can('find_materials'); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
5
|
|
|
|
|
41
|
return \@finders; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
__END__ |