line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::SWUECHO::Meta; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
23746
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
4
|
1
|
|
|
1
|
|
23
|
use 5.008_005; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
50
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
6
|
1
|
|
|
1
|
|
979
|
use PPI; |
|
1
|
|
|
|
|
258533
|
|
|
1
|
|
|
|
|
35
|
|
7
|
1
|
|
|
1
|
|
12
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
95
|
|
8
|
1
|
|
|
1
|
|
2195
|
use Pod::Simple::Search; |
|
1
|
|
|
|
|
6546
|
|
|
1
|
|
|
|
|
40
|
|
9
|
1
|
|
|
1
|
|
967
|
use Exporter::Auto; |
|
1
|
|
|
|
|
19989
|
|
|
1
|
|
|
|
|
7
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub subs_in_current_pkg { |
13
|
0
|
|
|
0
|
0
|
|
my $module = caller; |
14
|
1
|
|
|
1
|
|
86
|
no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
253
|
|
15
|
0
|
|
|
|
|
|
grep { defined *{"${module}::$_"}{CODE} } keys %{"${module}::"}; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# &{"${module}::$_"} equal to defined *{"$module\::$_"}{CODE} |
18
|
|
|
|
|
|
|
# why \::? |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
## TOOD: better ways to find module path |
23
|
|
|
|
|
|
|
sub module_path { |
24
|
0
|
|
|
0
|
1
|
|
my $module = shift; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# From This::That to This/That.pm |
27
|
0
|
|
|
|
|
|
s/::/\//g, s/$/.pm/ for $module; |
28
|
0
|
|
|
|
|
|
require $module ; |
29
|
0
|
|
|
|
|
|
$INC{$module} ; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub subs_in_pkg { |
35
|
0
|
|
|
0
|
1
|
|
my %all_sub; |
36
|
0
|
0
|
|
|
|
|
my $doc = PPI::Document->new(module_path(shift)) or croak 'no package name are given'; |
37
|
0
|
|
|
|
|
|
my $subs = $doc->find('PPI::Statement::Sub'); |
38
|
0
|
|
|
|
|
|
for my $sub ( @{$subs} ) { |
|
0
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
$all_sub{ $sub->name } = $sub->content # unless $sub->forward ; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
keys %all_sub; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
__END__ |