Branch Coverage

blib/lib/Sys/Cmd.pm
Criterion Covered Total %
branch 81 130 62.3


line true false branch
9 0 0 if not exists $s->{$_}
0 4 if $e{'M'}
70 752 $#_ ? :
0 47 unless $#_ % 2
0 47 unless $a{'is'}
0 918 $#_ && $a{'is'} eq 'ro' && caller ne 'Mo::coerce' ? :
0 17 unless exists $a{$n}
3 39 if ($a{'required'})
31 16 unless exists $a{'default'}
16 0 'CODE' eq $r ? :
0 16 'ARRAY' eq $r ? :
0 16 'HASH' eq ($r = ref $d) ? :
0 16 exists $a{'lazy'} ? :
0 16 unless $i
96 354 !exists $_[0]{$n} ? :
0 450 $#_ ? :
3 1 @_ == 1 ? :
0 4 @_ == 2 && !$_[1] ? :
36 0 0 if ($proc->exit != 0)
37 0 0 if $CONFESS
44 0 0 if @err
46 0 0 if (wantarray) { }
61 0 0 if ($proc->exit != 0)
62 0 0 if $CONFESS
69 0 0 if (wantarray) { }
80 14 40 if (ref $_ eq 'HASH') { }
88 0 26 unless @cmd and defined $cmd[0]
89 0 26 if @opts > 1
91 24 2 unless ("CODE" eq ref $cmd[0])
93 4 20 if ("File::Spec"->splitdir($cmd[0]) == 1)
99 2 18 unless (-x $cmd[0])
189 4 16 if $dir
190 4 16 if $dir
194 10 8 if (defined(my $x = $self->env))
196 12 4 if (defined $val) { }
205 2 16 $self->_code ? :
209 0 17 unless binmode $self->stdin, $enc
210 0 17 unless binmode $self->stdout, $enc
211 0 17 unless binmode $self->stderr, $enc
216 4 13 if (defined(my $input = $self->input))
220 2 2 if length $input
243 0 16 unless pipe my $child_in, $self->stdin
244 0 16 unless pipe $self->stdout, my $child_out
245 0 16 unless pipe $self->stderr, my $child_err
267 584 0 defined $ENV{$_} ? :
281 0 16 if $err
282 0 16 unless defined $self->pid
294 0 2 unless pipe my $child_in, $self->stdin
295 0 2 unless pipe $self->stdout, my $child_out
296 0 2 unless pipe $self->stderr, my $child_err
299 0 2 unless (defined $self->pid)
304 1 1 if ($self->pid > 0)
325 0 3 unless open $fh, $mode, $fileno
329 2 1 if $autoflush
339 1 0 if (my $code = $self->_code)
350 12 17 if (wantarray) { }
361 2 35 unless defined $self->pid
362 18 17 if defined $self->exit
370 0 17 if ($pid != $self->pid)
377 0 17 if ($ret == -1)
408 2 15 if (my $subref = $self->on_exit)
421 0 99 unless my $fh = $self->$h
422 52 47 unless $fh->opened
423 17 30 if ($h eq "stderr")
427 0 47 unless $fh->close