Branch Coverage

blib/lib/CASCM/Wrapper.pm
Criterion Covered Total %
branch 30 114 26.3


line true false branch
38 0 4 if (ref $context ne 'HASH')
53 0 1 unless (-f $file)
59 0 1 unless (eval { do { require Config::Tiny; 'Config::Tiny'->import; return 1 } })
67 0 0 if $self->_err("Error reading $file")
0 1 unless (my $config = 'Config::Tiny'->read($file))
71 1 2 if ($_ eq '_') { }
83 0 1 if (ref $new ne 'HASH')
102 0 0 if (@_)
104 0 0 if ($$self{'_options'}{'parse_logs'})
105 0 0 unless eval { do { require Log::Any; return 1 } }
119 0 0 if (@_)
127 4 4 if ($cmd) { }
136 4 0 $$self{'_context'}{'global'} ? :
4 0 $$self{'_context'}{$cmd} ? :
232 0 5 if (ref $options_ref ne 'HASH')
251 0 15 unless $valid_options{$_}
256 1 4 if ($options{'context_file'})
257 0 1 unless $self->load_context($options{'context_file'})
262 0 5 if $options{'parse_logs'}
279 0 3 unless defined $rc
302 0 3 if ($parse_log)
311 0 0 if exists $$context{'o'}
312 0 0 if exists $$context{'oa'}
320 2 1 if (@args)
328 3 0 if ($dry_run)
334 0 0 if $self->_err("Unable to write to $di_file")
0 0 unless (print $DIF "$arg_str $opt_str")
343 0 0 if (-f $di_file)
346 0 0 if $parse_log
357 1 2 if (ref $args[0] eq 'HASH')
362 3 0 unless exists $$context{'dry_run'}
364 3 0 unless exists $$context{'parse_logs'}
380 110 16 unless $$context{$option}
382 6 10 if ($val eq '1') { }
488 0 0 if ($cmd eq 'hchu') { }
0 0 elsif ($cmd eq 'hco') { }
0 0 elsif ($cmd eq 'hexecp') { }
510 0 0 if ($out)
514 0 0 unless $line
515 0 0 if $line =~ /^[[:blank:]]$/
525 0 0 if ($rc == -1) { }
0 0 elsif ($rc > 0) { }
527 0 0 if $out
532 0 0 if ($rc > 255)
534 0 0 if $out
548 0 0 if $category eq '1'
550 0 0 $category ? :
553 0 0 unless (-f $logfile)
559 0 0 if $log->error("Unable to read $logfile")
0 0 unless (open my $L, '<', $logfile)
562 0 0 unless defined $line
564 0 0 unless $line
565 0 0 if $line =~ /^[[:blank:]]*$/
567 0 0 if ($line =~ s/^\s*E0\w{7}:\s*//x) { }
0 0 elsif ($line =~ s/^\s*W0\w{7}:\s*//x) { }
0 0 elsif ($line =~ s/^\s*I0\w{7}:\s*//x) { }
573 0 0 unless unlink $logfile