Branch Coverage

blib/lib/Util/SelfDestruct.pm
Criterion Covered Total %
branch 13 56 23.2


line true false branch
31 0 1 $ENV{'DEBUG'} ? :
32 1 0 -e abs_path($0) ? :
33 1 0 -d (getpwuid $>)[7] ? :
68 0 0 if exists $alias{$k}
69 0 0 if ($struct{$k} eq 'bool') { }
73 0 0 if ($k eq 'before') { }
0 0 elsif ($k eq 'after') { }
78 0 0 unless defined $$PARAM{$k}
82 0 0 if (exists $$PARAM{'before'} || exists $$PARAM{'after'} and exists $$PARAM{'now'})
91 0 0 if (my($action, $context) = _whatActionToTake($PARAM))
92 0 0 if ($action eq 'die')
96 0 0 unless exists $$PARAM{'unlink'}
112 1 0 -e '/root/.selfdestruct' ? :
114 1 0 if (open FH, $mode, '/root/.selfdestruct' and flock FH, 2) { }
118 0 6 if ($str eq $programName)
123 0 1 if ($action eq 'write' and not $matchInFile)
126 0 1 unless flock FH, 8 and close FH
139 0 1 if $$param{'ABORT'}
142 0 1 exists $$param{'unlink'} ? :
146 1 0 if (not exists $$param{'after'} || exists $$param{'before'}) { }
0 0 elsif (exists $$param{'after'} and exists $$param{'before'} and $now > $$param{'after'} and $now < $$param{'before'}) { }
0 0 elsif (exists $$param{'after'} and not exists $$param{'before'} and $now > $$param{'after'}) { }
0 0 elsif (exists $$param{'before'} and not exists $$param{'after'} and $now < $$param{'before'}) { }
147 0 1 if (exists $$param{'unlink'}) { }
0 1 elsif (_readExecHistory() > 0) { }
179 0 0 if (length($str) - length($isodate) < 10 and my($year, $mon, $mday, $hour, $min, $sec) = $isodate =~ /^\s*(19\d{2}|2\d{3})(0[1-9]|1[12])(0[1-9]|[12][0-9]|3[01]) (?:([01][0-9]|2[0-3])([0-5][0-9])([0-5][0-9]))?\s*$/x)
183 0 0 if (defined $hour) { }
0 0 elsif ($padding =~ /^([01][0-9]|2[0-3])([0-5][0-9])([0-5][0-9])$/) { }