line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Monitoring::TT::Identifier; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
25
|
use strict qw{vars subs}; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
135
|
|
4
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
107
|
|
5
|
4
|
|
|
4
|
|
20
|
use utf8; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
21
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
##################################################################### |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Monitoring::TT::Identifier - Identify Functions |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 DESCRIPTION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Helper to indentify functions of a module |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
##################################################################### |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 METHODS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head2 functions |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
functions(name) |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
returns list of functions |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub functions { |
32
|
3
|
|
|
3
|
1
|
8
|
my($name) = @_; |
33
|
|
|
|
|
|
|
# Get all the CODE symbol table entries |
34
|
69
|
|
|
|
|
179
|
my @functions = sort grep { /\A[^\W\d]\w*\z/mxso } |
35
|
78
|
|
|
|
|
86
|
grep { defined &{"${name}::$_"} } |
|
78
|
|
|
|
|
186
|
|
36
|
3
|
|
|
|
|
7
|
keys %{"${name}::"}; |
|
3
|
|
|
|
|
38
|
|
37
|
3
|
|
|
|
|
17
|
return \@functions; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
##################################################################### |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 AUTHOR |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Sven Nierlein, 2013, |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |