| 1 | package Monitoring::TT::Identifier; | ||
| 2 | |||
| 3 | 4 | ▶ | use strict qw{vars subs}; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 4 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | ▶ | my($name) = @_; |
|
Subroutine
functions: called CC=1 SCAR=0.0
Pod
documented
| |||
| 33 | # Get all the CODE symbol table entries | ||
| 34 | 63 | my @functions = sort grep { /\A[^\W\d]\w*\z/mxso } | |
| 35 | 69 | grep { defined &{"${name}::$_"} } | |
| 36 | 3 | keys %{"${name}::"}; | |
| 37 | 3 | return \@functions; | |
| 38 | } | ||
| 39 | |||
| 40 | ##################################################################### | ||
| 41 | |||
| 42 | =head1 AUTHOR | ||
| 43 | |||
| 44 | Sven Nierlein, 2013, <sven.nierlein@consol.de> | ||
| 45 | |||
| 46 | =cut | ||
| 47 | |||
| 48 | 4 | 1; | |