| 1 | # ---------------------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # © Copyright 2000-2011 by Alex Peeters [alex.peeters@citap.be] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # ---------------------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | # 2011/mm/dd, v3.002.003, package ASNMTAP::Asnmtap Object-Oriented Perl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # ---------------------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | package ASNMTAP::Asnmtap; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 107 | ▶ | use Carp qw(carp cluck); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 107 | ▶ | use Getopt::Long; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 107 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 107 | ▶ | use warnings; # Must be used in test mode only. This reduces a little process speed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | #use diagnostics; # Must be used in test mode only. This reduces a lot of process speed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 107 | ▶ | no warnings 'deprecated'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 107 | ▶ | BEGIN { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 107 | ▶ | use Exporter (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 107 | @ASNMTAP::Asnmtap::ISA = qw(Exporter); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 107 | %ASNMTAP::Asnmtap::EXPORT_TAGS = (ALL => [ qw($APPLICATION $BUSINESS $DEPARTMENT $COPYRIGHT $SENDEMAILTO $TYPEMONITORING $RUNCMDONDEMAND | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | $CAPTUREOUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | $PREFIXPATH $LOGPATH $PIDPATH $PERL5LIB $MANPATH $LD_LIBRARY_PATH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | %ERRORS %STATE %TYPE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | $CHATCOMMAND $DIFFCOMMAND $KILLALLCOMMAND $PERLCOMMAND $PPPDCOMMAND $ROUTECOMMAND $RSYNCCOMMAND $SCPCOMMAND $SSHCOMMAND | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | &_checkAccObjRef | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | &_checkSubArgs0 &_checkSubArgs1 &_checkSubArgs2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | &_checkReadOnly0 &_checkReadOnly1 &_checkReadOnly2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | &_dumpValue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | $APPLICATIONPATH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | $PLUGINPATH) ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | ASNMTAP => [ qw($APPLICATION $BUSINESS $DEPARTMENT $COPYRIGHT $SENDEMAILTO $TYPEMONITORING $RUNCMDONDEMAND | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | $CAPTUREOUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | $PREFIXPATH $LOGPATH $PIDPATH $PERL5LIB $MANPATH $LD_LIBRARY_PATH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | %ERRORS %STATE %TYPE) ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | COMMANDS => [ qw($CHATCOMMAND $DIFFCOMMAND $KILLALLCOMMAND $PERLCOMMAND $PPPDCOMMAND $ROUTECOMMAND $RSYNCCOMMAND $SCPCOMMAND $SSHCOMMAND) ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | _HIDDEN => [ qw(&_checkAccObjRef | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | &_checkSubArgs0 &_checkSubArgs1 &_checkSubArgs2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | &_checkReadOnly0 &_checkReadOnly1 &_checkReadOnly2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | &_dumpValue) ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | APPLICATIONS => [ qw($APPLICATIONPATH) ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | PLUGINS => [ qw($PLUGINPATH) ] ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 107 | @ASNMTAP::Asnmtap::EXPORT_OK = ( @{ $ASNMTAP::Asnmtap::EXPORT_TAGS{ALL} } ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 107 | $ASNMTAP::Asnmtap::VERSION = do { my @r = (q$Revision: 3.002.003$ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | # read config file - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 107 | my %_config; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 107 | our $PREFIXPATH = '/opt/asnmtap'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 107 | my $_configfile = "$PREFIXPATH/Asnmtap.cnf"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 107 | ▶ | if ( -e $_configfile or ( exists $ENV{ASNMTAP_PATH} ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
-e $_configfile or exists $ENV{"ASNMTAP_PATH"}
MC/DC0%0/2
-e $_configfile or exists $ENV{"ASNMTAP_PATH"}
-e $_configfile
exists $ENV{"ASNMTAP_PATH"}
Truth table33%1/3
A or B
A= -e $_configfileB= exists $ENV{"ASNMTAP_PATH"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | ▶ | if ( exists $ENV{ASNMTAP_PATH} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | $PREFIXPATH = $ENV{ASNMTAP_PATH}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 0 | $_configfile = "$PREFIXPATH/Asnmtap.cnf"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | ▶ | die "ASNMTAP::Asnmtap: Config '$_configfile' doesn't exist." unless (-e $_configfile); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 107 | ▶ | use Config::General qw(ParseConfig); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | %_config = ParseConfig ( -ConfigFile => $_configfile, -InterPolateVars => 0 ) ; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | 0 | ▶ | die "ASNMTAP::Asnmtap: Config '$_configfile' can't be loaded." unless (%_config); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | undef $_configfile; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | # SET ENVIRONMENT VARIABLES = = = = = = = = = = = = = = = = = = = = = = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 107 | ▶ | $ENV{PATH} = ( exists $_config{ENV}{PATH} ) ? $_config{ENV}{PATH} : '/opt/csw/bin:/usr/local/bin:/usr/bin:/bin:/opt/csw/sbin:/usr/local/sbin:/usr/sbin:/sbin'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 107 | ▶ | $ENV{BASH_ENV} = ( exists $_config{ENV}{BASH_ENV} ) ? $_config{ENV}{BASH_ENV} : ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 107 | ▶ | $ENV{ENV} = ( exists $_config{ENV}{ENV} ) ? $_config{ENV}{ENV} : ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | # SET ASNMTAP::Asnmtap VARIABLES - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 107 | ▶ | our $PERL5LIB = $_config{SET}{PERL5LIB} if ( exists $_config{SET}{PERL5LIB} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 107 | ▶ | our $MANPATH = $_config{SET}{MANPATH} if ( exists $_config{SET}{MANPATH} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 107 | ▶ | our $LD_LIBRARY_PATH = $_config{SET}{LD_LIBRARY_PATH} if ( exists $_config{SET}{LD_LIBRARY_PATH} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 107 | our $APPLICATIONPATH = $PREFIXPATH .'/applications'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 107 | our $PLUGINPATH = $PREFIXPATH .'/plugins'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 107 | our $LOGPATH = $PREFIXPATH .'/log'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 107 | our $PIDPATH = $PREFIXPATH .'/pid'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 107 | ▶ | if ( exists $_config{SUBDIR} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | ▶ | $APPLICATIONPATH = $PREFIXPATH .'/'. $_config{SUBDIR}{APPLICATIONS} if ( exists $_config{SUBDIR}{APPLICATIONS} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | ▶ | $PLUGINPATH = $PREFIXPATH .'/'. $_config{SUBDIR}{PLUGINS} if ( exists $_config{SUBDIR}{PLUGINS} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | ▶ | $LOGPATH = $PREFIXPATH .'/'. $_config{SUBDIR}{LOG} if ( exists $_config{SUBDIR}{LOG} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | ▶ | $PIDPATH = $PREFIXPATH .'/'. $_config{SUBDIR}{PID} if ( exists $_config{SUBDIR}{PID} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 107 | ▶ | our $APPLICATION = ( exists $_config{COMMON}{APPLICATION} ) ? $_config{COMMON}{APPLICATION} : 'Application Monitoring'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 107 | ▶ | our $BUSINESS = ( exists $_config{COMMON}{BUSINESS} ) ? $_config{COMMON}{BUSINESS} : 'CITAP'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 107 | ▶ | our $DEPARTMENT = ( exists $_config{COMMON}{DEPARTMENT} ) ? $_config{COMMON}{DEPARTMENT} : 'Development'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 107 | ▶ | our $COPYRIGHT = ( exists $_config{COMMON}{COPYRIGHT} ) ? $_config{COMMON}{COPYRIGHT} : '2000-2011'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 107 | ▶ | our $SENDEMAILTO = ( exists $_config{COMMON}{SENDEMAILTO} ) ? $_config{COMMON}{SENDEMAILTO} : 'alex.peeters@citap.be'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 107 | ▶ | our $TYPEMONITORING = ( exists $_config{COMMON}{TYPEMONITORING} ) ? $_config{COMMON}{TYPEMONITORING} : 'central'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 107 | ▶ | our $RUNCMDONDEMAND = ( exists $_config{COMMON}{RUNCMDONDEMAND} ) ? $_config{COMMON}{RUNCMDONDEMAND} : 'localhost'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 107 | ▶ | our $CAPTUREOUTPUT = ( exists $_config{IO}{CAPTUREOUTPUT} ) ? $_config{IO}{CAPTUREOUTPUT} : 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 107 | our $CHATCOMMAND = '/usr/sbin/chat'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 107 | our $DIFFCOMMAND = '/usr/bin/diff'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | 107 | our $KILLALLCOMMAND = '/usr/bin/killall'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 107 | our $PERLCOMMAND = '/usr/bin/perl'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 107 | our $PPPDCOMMAND = '/usr/sbin/pppd'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 107 | our $ROUTECOMMAND = '/sbin/route'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 107 | our $RSYNCCOMMAND = '/usr/bin/rsync'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 107 | our $SCPCOMMAND = '/usr/bin/scp'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 107 | our $SSHCOMMAND = '/usr/bin/ssh'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 107 | ▶ | if ( exists $_config{COMMAND} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | ▶ | $CHATCOMMAND = $_config{COMMAND}{CHAT} if ( exists $_config{COMMAND}{CHAT} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 0 | ▶ | $DIFFCOMMAND = $_config{COMMAND}{DIFF} if ( exists $_config{COMMAND}{DIFF} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | $KILLALLCOMMAND = $_config{COMMAND}{KILLALL} if ( exists $_config{COMMAND}{KILLALL} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | ▶ | $PERLCOMMAND = $_config{COMMAND}{PERL} if ( exists $_config{COMMAND}{PERL} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | ▶ | $PPPDCOMMAND = $_config{COMMAND}{PPPD} if ( exists $_config{COMMAND}{PPPD} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | ▶ | $ROUTECOMMAND = $_config{COMMAND}{ROUTE} if ( exists $_config{COMMAND}{ROUTE} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | ▶ | $RSYNCCOMMAND = $_config{COMMAND}{RSYNC} if ( exists $_config{COMMAND}{RSYNC} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | ▶ | $SCPCOMMAND = $_config{COMMAND}{SCP} if ( exists $_config{COMMAND}{SCP} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | ▶ | $SSHCOMMAND = $_config{COMMAND}{SSH} if ( exists $_config{COMMAND}{SSH} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 107 | undef %_config; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | # Plugin variables - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 107 | our %ERRORS = ('OK'=>'0','WARNING'=>'1','CRITICAL'=>'2','UNKNOWN'=>'3','DEPENDENT'=>'4','OFFLINE'=>'5','NO TEST'=>'6','NO DATA'=>'7','IN PROGRESS'=>'8','TRENDLINE'=>'9'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 107 | our %STATE = ('0'=>'OK','1'=>'WARNING','2'=>'CRITICAL','3'=>'UNKNOWN','4'=>'DEPENDENT','5'=>'OFFLINE','6'=>'NO TEST','7'=>'NO DATA','8'=>'IN PROGRESS','9'=>'TRENDLINE'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 107 | our %TYPE = ('REPLACE'=>'0','APPEND'=>'1','INSERT'=>'2','COMMA_REPLACE'=>'3','COMMA_APPEND'=>'4','COMMA_INSERT'=>'5'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | # Constructor & initialisation - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 106 | ▶ | sub new (@) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=15 SCAR=29.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 106 | my $classname = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | ▶ | unless ( defined $classname ) { my @c = caller; die "Syntax error: Class name expected after new at $c[1] line $c[2]\n" } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | ▶ | if ( ref $classname) { my @c = caller; die "Syntax error: Can't construct new ".ref($classname)." from another object at $c[1] line $c[2]\n" } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 106 | my $self = {}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 106 | my @parameters = (_programName => 'NOT DEFINED', | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | _programDescription => 'NOT DEFINED', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | _programVersion => '0.000.000', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | _programUsagePrefix => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | _programUsageSuffix => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | _programHelpPrefix => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | _programHelpSuffix => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | _programGetOptions => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | _debug => 0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 106 | ▶ | if ( $] < 5.010000 ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | eval "use fields"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | $self = fields::phash (@parameters); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | 107 | ▶ | use ASNMTAP::PseudoHash; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | 106 | $self = do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 106 | my @array = undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 106 | ▶ | while (my ($k, $v) = splice(@parameters, 0, 2)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 954 | $array[$array[0]{$k} = @array] = $v; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 106 | bless(\@array, $classname); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | 106 | my %args = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 106 | ▶ | $self->{_programName} = $args{_programName} if ( exists $args{_programName} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | 106 | ▶ | $self->{_programDescription} = $args{_programDescription} if ( exists $args{_programDescription} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | 106 | ▶ | $self->{_programVersion} = $args{_programVersion} if ( exists $args{_programVersion} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 106 | ▶ | $self->{_programUsagePrefix} = $args{_programUsagePrefix} if ( exists $args{_programUsagePrefix} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 106 | ▶ | $self->{_programHelpPrefix} = $args{_programHelpPrefix} if ( exists $args{_programHelpPrefix} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 106 | ▶ | $self->{_programUsageSuffix} = $args{_programUsageSuffix} if ( exists $args{_programUsageSuffix} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 106 | ▶ | $self->{_programHelpSuffix} = $args{_programHelpSuffix} if ( exists $args{_programHelpSuffix} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | 106 | ▶ | $self->{_programGetOptions} = $args{_programGetOptions} if ( exists $args{_programGetOptions} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | 106 | ▶ | $self->{_debug} = $args{_debug} if ( exists $args{_debug} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 106 | ▶ | if ( defined $self->{_programVersion} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 106 | $self->{_programVersion} =~ s/^\$Revision: //; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | 106 | $self->{_programVersion} =~ s/ \$\s*$//; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 106 | bless ($self, $classname); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 106 | $self->_init(\%args); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | 106 | $self->_getOptions(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 40 | return ($self); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | 106 | ▶ | sub _init { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_init: called CC=2 SCAR=7.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | 106 | ▶ | carp ('ASNMTAP::Asnmtap: _init') if ( $_[0]->{_debug} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 106 | $_[0]->{_programUsageSuffix} = ' [-v|--verbose <LEVEL>] [-V|--version] [-h|--help] [--usage] [--dumpData]'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | 106 | $_[0]->{_programHelpSuffix} = " | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | -v, --verbose=<LEVEL> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | 0: single line, minimal output | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | 1: single line, additional information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | 2: multi line, configuration debug output | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | 3: lots of detail for problem diagnosis | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | -V, --version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | Report version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | -h, --help | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | Display the help message | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | --usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | Display the short usage statement | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | --dumpData | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | Display the stringified data structures from the current object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | "; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | 106 | push (@{ $_[0]->{_programGetOptions} }, 'verbose|v:i', 'version|V', 'help|h', 'usage', 'dumpData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 106 | $_[0]->[ $_[0]->[0]{_getOptionsType} = @{$_[0]} ] = {}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | 130 | ▶ | sub _getOptions { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_getOptions: called CC=8 SCAR=21.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | 130 | ▶ | carp ('ASNMTAP::Asnmtap: _getOptions') if ( $_[0]->{_debug} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | 130 | Getopt::Long::Configure ('bundling', 'pass_through'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | 130 | my %getOptionsArgv; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | 130 | my $programGetOptions = $_[0]->{_programGetOptions}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 130 | my $resultGetOptions = GetOptions ( \%getOptionsArgv, @$programGetOptions ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | 130 | ▶ | carp ('ASNMTAP::Asnmtap: _getOptions '. "Unknown option(s): @ARGV") if ( ref $_[0] !~ /ASNMTAP::Asnmtap::Plugins/ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | 130 | $_[0]->[ $_[0]->[0]{_getOptionsArgv} = @{$_[0]} ] = {%getOptionsArgv}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 130 | ▶ | $_[0]->printRevision () if ( exists $_[0]->{_getOptionsArgv}->{version} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | 106 | ▶ | $_[0]->printHelp () if ( exists $_[0]->{_getOptionsArgv}->{help} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | 82 | ▶ | $_[0]->printUsage ('.') if ( exists $_[0]->{_getOptionsArgv}->{usage} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | 82 | ▶ | my $verbose = (exists $_[0]->{_getOptionsArgv}->{verbose}) ? $_[0]->{_getOptionsArgv}->{verbose} : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | 82 | ▶ | $_[0]->printUsage ('Invalid verbose option: '. $verbose) unless ($verbose =~ /^[0123]$/); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | 82 | $_[0]->[ $_[0]->[0]{_getOptionsValues} = @{$_[0]} ] = {}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | 0 | ▶ | sub _checkAccObjRef { unless ( ref $_[0] ) { cluck 'Syntax error: Access object reference expected'; exit $ERRORS{UNKNOWN} } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_checkAccObjRef: called CC=2 SCAR=10.5
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | ▶ | sub _checkSubArgs0 { if ( @_ > 1 ) { cluck "Syntax error: To many arguments ". (caller 1)[3]; exit $ERRORS{UNKNOWN} } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_checkSubArgs0: called CC=2 SCAR=10.5
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | ▶ | sub _checkSubArgs1 { if ( @_ > 2 ) { cluck "Syntax error: To many arguments ". (caller 1)[3]; exit $ERRORS{UNKNOWN} } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_checkSubArgs1: called CC=2 SCAR=10.5
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | 0 | ▶ | sub _checkSubArgs2 { if ( @_ > 3 ) { cluck "Syntax error: To many arguments ". (caller 1)[3]; exit $ERRORS{UNKNOWN} } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_checkSubArgs2: called CC=2 SCAR=10.5
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | 0 | ▶ | sub _checkReadOnly0 { if ( @_ > 1 ) { cluck "Syntax error: Can't change value of read-only attribute ". (caller 1)[3]; exit $ERRORS{UNKNOWN} } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_checkReadOnly0: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | ▶ | sub _checkReadOnly1 { if ( @_ > 2 ) { cluck "Syntax error: Can't change value of read-only attribute ". (caller 1)[3]; exit $ERRORS{UNKNOWN} } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_checkReadOnly1: called CC=2 SCAR=10.5
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | 0 | ▶ | sub _checkReadOnly2 { if ( @_ > 3 ) { cluck "Syntax error: Can't change value of read-only attribute ". (caller 1)[3]; exit $ERRORS{UNKNOWN} } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_checkReadOnly2: called CC=2 SCAR=10.5
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 0 | ▶ | sub _dumpValue { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_dumpValue: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 0 | require Dumpvalue; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | 0 | my $dumper = Dumpvalue->new (); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | print "\n->ASNMTAP::Asnmtap: Dump debug data\n\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | 0 | $dumper->dumpValue ( $_[0] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | print "\n\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 0 | cluck $_[1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | exit $ERRORS{UNKNOWN}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | # Object accessor methods - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 6 | ▶ | sub programName { &_checkAccObjRef ( $_[0] ); &_checkSubArgs1; $_[0]->{_programName} = $_[1] if ( defined $_[1] ); $_[0]->{_programName}; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
programName: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | 6 | ▶ | sub programDescription { &_checkAccObjRef ( $_[0] ); &_checkSubArgs1; $_[0]->{_programDescription} = $_[1] if ( defined $_[1] ); $_[0]->{_programDescription}; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
programDescription: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | 6 | ▶ | sub programVersion { &_checkAccObjRef ( $_[0] ); &_checkSubArgs1; $_[0]->{_programVersion} = $_[1] if ( defined $_[1] ); $_[0]->{_programVersion}; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
programVersion: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | 187 | ▶ | sub getOptionsArgv { &_checkAccObjRef ( $_[0] ); &_checkReadOnly1; ( defined $_[1] and defined $_[0]->{_getOptionsArgv}->{$_[1]} ) ? $_[0]->{_getOptionsArgv}->{$_[1]} : undef; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getOptionsArgv: called CC=3 SCAR=11.0
Pod
documented
Branch: 1 branch
Condition66%2/3
defined $_[1] and defined $_[0]{"_getOptionsArgv"}{$_[1]}
MC/DC50%1/2
defined $_[1] and defined $_[0]{"_getOptionsArgv"}{$_[1]}
defined $_[1]
defined $_[0]{"_getOptionsArgv"}{$_[1]}
Truth table66%2/3
A and B
A= defined $_[1]B= defined $_[0]{"_getOptionsArgv"}{$_[1]}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | 74 | ▶ | sub getOptionsValue { &_checkAccObjRef ( $_[0] ); &_checkReadOnly1; ( defined $_[1] and defined $_[0]->{_getOptionsValues}->{$_[1]} ) ? $_[0]->{_getOptionsValues}->{$_[1]} : undef; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getOptionsValue: called CC=3 SCAR=11.0
Pod
documented
Branch: 1 branch
Condition66%2/3
defined $_[1] and defined $_[0]{"_getOptionsValues"}{$_[1]}
MC/DC50%1/2
defined $_[1] and defined $_[0]{"_getOptionsValues"}{$_[1]}
defined $_[1]
defined $_[0]{"_getOptionsValues"}{$_[1]}
Truth table66%2/3
A and B
A= defined $_[1]B= defined $_[0]{"_getOptionsValues"}{$_[1]}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | 0 | ▶ | sub getOptionsType { &_checkAccObjRef ( $_[0] ); &_checkReadOnly1; ( defined $_[1] and defined $_[0]->{_getOptionsType}->{$_[1]} ) ? $_[0]->{_getOptionsType}->{$_[1]} : undef; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getOptionsType: not called CC=3 SCAR=24.8
Pod
documented
Branch: 1 branch
Condition0%0/3
defined $_[1] and defined $_[0]{"_getOptionsType"}{$_[1]}
MC/DC0%0/2
defined $_[1] and defined $_[0]{"_getOptionsType"}{$_[1]}
defined $_[1]
defined $_[0]{"_getOptionsType"}{$_[1]}
Truth table0%0/3
A and B
A= defined $_[1]B= defined $_[0]{"_getOptionsType"}{$_[1]}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | 12 | ▶ | sub debug { &_checkAccObjRef ( $_[0] ); &_checkSubArgs1; $_[0]->{_debug} = $_[1] if ( defined $_[1] and $_[1] =~ /^[01]$/ ); $_[0]->{_debug}; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
debug: called CC=3 SCAR=11.0
Pod
documented
Branch: 1 branch
Condition100%3/3
defined $_[1] and $_[1] =~ /^[01]$/
MC/DC100%2/2
defined $_[1] and $_[1] =~ /^[01]$/
defined $_[1]
$_[1] =~ /^[01]$/
Truth table100%3/3
A and B
A= defined $_[1]B= $_[1] =~ /^[01]$/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | # Class accessor methods - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | 2 | ▶ | sub dumpData { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
dumpData: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 2 | &_checkAccObjRef ( $_[0] ); &_checkSubArgs1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 2 | ▶ | if ( defined $_[1] or $_[0]->{_debug} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $_[1] or $_[0]{"_debug"}
MC/DC50%1/2
defined $_[1] or $_[0]{"_debug"}
defined $_[1]
$_[0]{"_debug"}
Truth table66%2/3
A or B
A= defined $_[1]B= $_[0]{"_debug"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | 107 | ▶ | use Data::Dumper; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | 1 | print "\n". ref ($_[0]) .": Now we'll dump data\n\n", Dumper ( $_[0] ), "\n\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | # Utility methods - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | 33 | ▶ | sub printRevision { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
printRevision: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | 33 | &_checkAccObjRef ( $_[0] ); &_checkSubArgs1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | 33 | print "\nThis is program: ", $_[0]->{_programName}, " (", $_[0]->{_programDescription}, ") v", $_[0]->{_programVersion}, " | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | Copyright (c) $COPYRIGHT ASNMTAP, Author: Alex Peeters [alex.peeters\@citap.be] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | "; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | 33 | ▶ | exit ( (ref $_[0]) =~ /^ASNMTAP::Asnmtap::Plugins/ ? $ERRORS{UNKNOWN} : 0 ) unless ( defined $_[1] ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | 47 | ▶ | sub printUsage { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
printUsage: called CC=6 SCAR=18.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | 47 | &_checkAccObjRef ( $_[0] ); &_checkSubArgs1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | 47 | print 'Usage: ', $_[0]->{_programName}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | 47 | ▶ | print (' ', $_[0]->{_programUsagePrefix}) if ( defined $_[0]->{_programUsagePrefix} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | 47 | ▶ | print (' ', $_[0]->{_programUsageSuffix}) if ( defined $_[0]->{_programUsageSuffix} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | 47 | print "\n\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | 47 | ▶ | if ( defined $_[1] ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | 38 | ▶ | print ($_[1], "\n") unless ($_[1] eq '.'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | 38 | ▶ | exit ( (ref $_[0]) =~ /^ASNMTAP::Asnmtap::Plugins/ ? $ERRORS{UNKNOWN} : 0 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | 9 | ▶ | sub printHelp { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
printHelp: called CC=4 SCAR=14.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | 9 | &_checkAccObjRef ( $_[0] ); &_checkSubArgs0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | 9 | $_[0]->printRevision(1); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | 9 | $_[0]->printUsage(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | 9 | ▶ | print $_[0]->{_programHelpPrefix}, "\n" if ( defined $_[0]->{_programHelpPrefix} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | 9 | ▶ | print $_[0]->{_programHelpSuffix}, "\n" if ( defined $_[0]->{_programHelpSuffix} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | 9 | print "Send email to $SENDEMAILTO if you have questions regarding\nuse of this software. To submit patches or suggest improvements, send\nemail to $SENDEMAILTO\n\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | 9 | ▶ | exit ( (ref $_[0]) =~ /^ASNMTAP::Asnmtap::Plugins/ ? $ERRORS{UNKNOWN} : 0 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | 6 | ▶ | sub call_system { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
call_system: called CC=7 SCAR=20.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | 6 | &_checkAccObjRef ( $_[0] ); &_checkSubArgs1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | 6 | my ($stdout, $stderr); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | 6 | ▶ | if ( $CAPTUREOUTPUT ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | 107 | ▶ | use IO::CaptureOutput qw(capture_exec); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | 6 | ($stdout, $stderr) = capture_exec ( $_[1] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | 6 | chomp($stdout); chomp($stderr); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | 0 | $stdout = $stderr = ''; system ( $_[1] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | 6 | my $exit_value = $? >> 8; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | 6 | my $signal_num = $? & 127; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | 6 | my $dumped_core = $? & 128; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | 6 | ▶ | my $status = ( $exit_value == 0 && $signal_num == 0 && $dumped_core == 0 && $stderr eq '' ) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%6/9
$exit_value == 0 and $signal_num == 0 and $dumped_core == 0 and $stderr eq ""
$exit_value == 0 and $signal_num == 0 and $dumped_core == 0
$exit_value == 0 and $signal_num == 0
MC/DC25%1/4
$exit_value == 0 and $signal_num == 0 and $dumped_core == 0 and $stderr eq ""
$exit_value == 0
$signal_num == 0
$dumped_core == 0
$stderr eq ""
Truth table40%2/5
A and B and C and D
A= $exit_value == 0B= $signal_num == 0C= $dumped_core == 0D= $stderr eq ""
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | 6 | ▶ | if ( $_[0]->{_debug} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | 0 | print ref $_[0], ": command : $_[1]\n", | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | ref $_[0], ": exit value : $exit_value\n", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | ref $_[0], ": signal number: $signal_num\n", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | ref $_[0], ": dumped core : $dumped_core\n", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | ref $_[0], ": status : $status\n", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | ref $_[0], ": stdout : '$stdout'\n", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | ref $_[0], ": stderr : '$stderr'\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | 6 | return ( $status, $stdout, $stderr ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | # Destructor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | 0 | ▶ | sub DESTROY { print (ref ($_[0]), "::DESTROY: ()\n") if ( $_[0]->{_debug} ); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
DESTROY: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | 107 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||