Branch Coverage

blib/lib/App/MonM/Util.pm
Criterion Covered Total %
branch 51 142 35.9


line true false branch
233 0 0 if $dumper->can("Sortkeys")
238 0 0 if defined $_
251 0 11 if (not $time or lc $time eq 'now') { }
0 11 elsif ($time =~ /^\d+$/) { }
11 0 elsif ($time =~ /^([+-]?(?:\d+|\d*\.\d*))([smhdMy])/) { }
262 0 5 if $s =~ /^\d+$/
267 2 9 if $i < 0
269 2 9 $i < 0 ? :
271 2 3 $c ? :
280 0 0 if (ref $sects eq 'ARRAY') { }
0 0 elsif (ref $sects eq 'HASH' and not exists $sects->{'enable'}) { }
0 0 elsif (ref $sects eq 'HASH') { }
282 0 0 if (ref $r eq 'HASH' and exists $r->{'enable'}) { }
0 0 elsif (ref $r eq 'HASH') { }
284 0 0 unless not @names or grep {$r->{'name'} eq lc $_;} @names
289 0 0 unless ref $v eq "HASH"
291 0 0 unless not @names or grep {$v->{'name'} eq lc $_;} @names
299 0 0 unless ref $v eq "HASH"
301 0 0 unless not @names or grep {$v->{'name'} eq lc $_;} @names
306 0 0 if not @names or grep {$sects->{'name'} eq lc $_;} @names
312 0 0 unless $n and ref($n) =~ /ARRAY|HASH/
313 0 0 if ref $n eq "HASH"
318 1 0 is_array($in) ? :
321 3 0 if $_ =~ /^\s*(\S+)\s+(.+)$/
333 0 0 $v & 1 << $n ? :
337 0 0 unless @right
338 0 0 if @right > 1
344 0 0 if ($hr and $hl) { }
360 0 0 unless $file
362 0 0 unless defined $fh
363 0 0 $isbin ? :
372 0 0 unless defined $ret
379 0 0 unless defined $fh
392 0 0 if $timeout
393 0 0 if $exe_in
396 0 0 if $cmd
406 0 0 $r->{'exit_code'} ? :
0 0 $r->{'exit_code'} ? :
412 0 0 if ($r->{'killed_by_signal'})
420 0 0 if ($ret{'code'} and not length $ret{'stderr'})
501 0 0 unless $chname
503 0 0 exists $added->{$chname} ? :
509 0 4 unless $chname
514 0 4 if $added->{$chname} and $added->{$chname} eq $at
532 0 4 unless exists $self->{'calendar'}{$chname}
534 1 3 if is_void($calendar)
543 0 17 unless is_hash($int)
545 13 4 unless $sec and is_array($sec)
547 0 4 unless $s + $f
548 2 2 if ($t >= $s and $t <= $f or $t >= $f and $t <= $s)
561 0 8 if $t =~ /\[\-+\]/
573 4 4 if ($wd =~ /^[a-z]{3,9}$/) { }
4 0 elsif ($wd =~ /([a-z]{3,9})[\-]+([a-z]{3,9})/) { }
574 0 4 if $dw_aliases{$wd}
575 0 4 unless exists $dw_map{$wd}
581 1 3 if $dw_aliases{$sd}
582 0 4 if $dw_aliases{$fd}
583 0 4 unless exists $dw_map{$sd} and exists $dw_map{$fd}
589 4 23 if not $start_flag and $dw_map{$sd} == $wdi
590 9 18 unless $start_flag
592 0 18 if $mx-- <= 0
599 4 14 if $dw_map{$fd} == $wdi
609 9 1 if $s or $f
615 0 10 unless defined $period
618 0 10 if ($period =~ /^\-+$/) { }
1 9 elsif ($period =~ /none|no|off/i) { }
8 1 elsif ($period =~ /(\d{1,2})\s*\:\s*(\d{1,2})\s*\-+\s*(\d{1,2})\s*\:\s*(\d{1,2})/) { }
1 0 elsif ($period =~ /(\d{1,2})\s*\-+\s*(\d{1,2})\s*\:\s*(\d{1,2})/) { }
0 0 elsif ($period =~ /(\d{1,2})\s*\-+\s*(\d{1,2})/) { }
638 0 9 if $start < 0 or $start > 86399
639 0 9 if $finish < 0 or $finish > 86399