line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Functions; |
2
|
3
|
|
|
3
|
|
104463
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
179
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
88
|
|
4
|
3
|
|
|
3
|
|
89
|
use 5.008005; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
158
|
|
5
|
|
|
|
|
|
|
our $VERSION = '2.1.3'; |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
1176
|
use parent qw/Exporter/; |
|
3
|
|
|
|
|
416
|
|
|
3
|
|
|
|
|
17
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
3043
|
use Sub::Identify (); |
|
3
|
|
|
|
|
3978
|
|
|
3
|
|
|
|
|
236
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT = qw(get_public_functions); |
12
|
|
|
|
|
|
|
our @EXPORT_OK = qw(get_full_functions); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub get_public_functions { |
15
|
2
|
|
66
|
2
|
1
|
1298
|
my $klass = shift || caller(0); |
16
|
2
|
|
|
|
|
4
|
my @functions; |
17
|
3
|
|
|
3
|
|
25
|
no strict 'refs'; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
787
|
|
18
|
2
|
|
|
|
|
14
|
my %class = %{"${klass}::"}; |
|
2
|
|
|
|
|
42
|
|
19
|
2
|
|
|
|
|
15
|
while (my ($k, $v) = each %class) { |
20
|
14
|
100
|
|
|
|
112
|
next if $k =~ /^(?:BEGIN|UNITCHECK|INIT|CHECK|END|import)$/; |
21
|
11
|
50
|
|
|
|
29
|
next if $k =~ /^_/; |
22
|
11
|
100
|
|
|
|
24
|
next unless *{"${klass}::${k}"}{CODE}; |
|
11
|
|
|
|
|
64
|
|
23
|
6
|
100
|
|
|
|
48
|
next if $klass ne Sub::Identify::stash_name( $klass->can($k) ); |
24
|
2
|
|
|
|
|
21
|
push @functions, $k; |
25
|
|
|
|
|
|
|
} |
26
|
2
|
|
|
|
|
18
|
return @functions; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub get_full_functions { |
30
|
1
|
|
33
|
1
|
1
|
13
|
my $klass = shift || caller(0); |
31
|
3
|
|
|
3
|
|
17
|
no strict 'refs'; |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
212
|
|
32
|
1
|
|
|
|
|
3
|
return keys %{"${klass}::"}; |
|
1
|
|
|
|
|
17
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |