line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Monitoring::TT::Identifier; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
24
|
use strict qw{vars subs}; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
139
|
|
4
|
4
|
|
|
4
|
|
21
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
110
|
|
5
|
4
|
|
|
4
|
|
19
|
use utf8; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
29
|
|
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
|
9
|
my($name) = @_; |
33
|
|
|
|
|
|
|
# Get all the CODE symbol table entries |
34
|
42
|
|
|
|
|
225
|
my @functions = sort grep { /\A[^\W\d]\w*\z/mxso } |
|
48
|
|
|
|
|
204
|
|
35
|
48
|
|
|
|
|
52
|
grep { defined &{"${name}::$_"} } |
|
3
|
|
|
|
|
27
|
|
36
|
3
|
|
|
|
|
8
|
keys %{"${name}::"}; |
37
|
3
|
|
|
|
|
18
|
return \@functions; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
##################################################################### |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 AUTHOR |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Sven Nierlein, 2013, |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |