Branch Coverage

blib/lib/CASCM/Wrapper.pm
Criterion Covered Total %
branch 32 124 25.8


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} ? :
157 0 2 unless defined $arg
165 2 1 if @quoted
249 0 5 if (ref $options_ref ne 'HASH')
268 0 15 unless $valid_options{$_}
273 1 4 if ($options{'context_file'})
274 0 1 unless $self->load_context($options{'context_file'})
279 0 5 if $options{'parse_logs'}
296 0 3 unless defined $rc
319 0 3 if ($parse_log)
328 0 0 if exists $$context{'o'}
329 0 0 if exists $$context{'oa'}
342 3 0 if ($dry_run)
348 0 0 if $self->_err("Unable to write to $di_file")
0 0 unless (print $DIF "$arg_str $opt_str")
357 0 0 if (-f $di_file)
363 0 0 if $parse_log
374 1 2 if (ref $args[0] eq 'HASH')
379 3 0 unless exists $$context{'dry_run'}
381 3 0 unless exists $$context{'parse_logs'}
397 110 16 unless $$context{$option}
399 6 10 if ($val eq '1') { }
403 0 10 if ($val =~ /^\s*\-arg/) { }
499 0 0 if ($rc > 255)
523 0 0 if ($cmd eq 'hchu') { }
0 0 elsif ($cmd eq 'hco') { }
0 0 elsif ($cmd eq 'hexecp') { }
545 0 0 if ($out)
551 0 0 unless $line
552 0 0 if $line =~ /^[[:blank:]]$/
562 0 0 if ($rc == -1) { }
0 0 elsif ($rc > 0) { }
564 0 0 if $out
569 0 0 if ($error{$rc}) { }
571 0 0 if $out
574 0 0 if ($out) { }
590 0 0 if $category eq '1'
592 0 0 $category ? :
595 0 0 unless (-f $logfile)
599 0 0 if $self->errstr
603 0 0 unless (open my $LOG, '<', $logfile)
605 0 0 if $self->errstr
611 0 0 unless defined $line
615 0 0 unless $line
616 0 0 if $line =~ /^[[:blank:]]*$/
618 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) { }
626 0 0 if $self->errstr