Branch Coverage

blib/lib/IPC/ShellCmd.pm
Criterion Covered Total %
branch 0 268 0.0


line true false branch
75 0 0 if (not $cmd && ref $cmd or ref $cmd ne 'ARRAY')
81 0 0 unless (@cmd)
86 0 0 if not defined $cmd_el or ref $cmd_el
103 0 0 unless $$opts{'-nowarn'}
111 0 0 if $$opts{'-debug'} and $$opts{'-debug'} =~ /^\d+$/
115 0 0 if $$opts{'-argv0'} and not ref $$opts{'-argv0'}
124 0 0 if $level <= $$self{'debug'}
139 0 0 if ($$self{'opts'}{'warn'} and defined $$self{'umask'})
143 0 0 unless (defined $umask)
147 0 0 if ($$self{'run'})
151 0 0 if (ref $umask or not $umask =~ /^\d+$/)
171 0 0 if (@_ and not defined $_[0])
177 0 0 if ($$self{'opts'}{'warn'} and defined $$self{'wd'})
181 0 0 if ($$self{'run'} and defined $path)
185 0 0 if (defined $path and not ref $path) { }
0 0 elsif (defined $path) { }
207 0 0 if $$self{'run'}
210 0 0 unless @_
217 0 0 if ($$self{'opts'}{'warn'} and exists $$self{'env'}{$e})
258 0 0 if $$self{'run'}
261 0 0 unless &Scalar::Util::blessed($obj) and $obj->can('chain')
264 0 0 unless $$self{'chain'}
268 0 0 if ($opts{'-include-stdin'})
271 0 0 if ($opts{'-include-stdout'})
274 0 0 if ($opts{'-include-stderr'})
342 0 0 if $$self{'run'}
345 0 0 if $$self{'opts'}{'warn'} and $$self{'stdin'}
348 0 0 if (@_ == 1) { }
0 0 elsif (@_ == 2) { }
349 0 0 unless (defined $_[0])
353 0 0 if (ref $_[0] and ref $_[0] ne 'CODE' and ref $_[0] ne 'SCALAR') { }
0 0 elsif (not ref $_[0]) { }
0 0 elsif (ref $_[0] eq 'CODE') { }
0 0 elsif (ref $_[0] eq 'SCALAR') { }
373 0 0 unless (defined $_[0])
377 0 0 if ($_[0] eq '-inherit') { }
0 0 elsif ($_[0] eq '-file') { }
0 0 elsif ($_[0] eq '-filename') { }
0 0 elsif ($_[0] eq '-fd') { }
386 0 0 if (not defined $_[1] or ref $_[1] or $_[1] =~ /\000/)
393 0 0 if (not defined $_[1] or ref $_[1] or not $_[1] =~ /^\d+$/)
493 0 0 if (@_ == 0)
494 0 0 if ($$self{'run'}) { }
495 0 0 if (exists $$self{$name . '_text'}) { }
509 0 0 if $$self{'run'}
512 0 0 if (@_ == 1) { }
0 0 elsif (@_ == 2) { }
513 0 0 unless (defined $_[0])
517 0 0 if (not ref $_[0] or ref $_[0] ne 'CODE' and ref $_[0] ne 'SCALAR') { }
0 0 elsif (ref $_[0] eq 'CODE') { }
0 0 elsif (ref $_[0] eq 'SCALAR') { }
533 0 0 unless (defined $_[0])
537 0 0 if ($_[0] eq '-inherit') { }
0 0 elsif ($_[0] eq '-file') { }
0 0 elsif ($_[0] eq '-filename') { }
0 0 elsif ($_[0] eq '-fd') { }
538 0 0 if ($name eq 'stdout') { }
551 0 0 if (not defined $_[1] or ref $_[1] or $_[1] =~ /\000/)
558 0 0 if (not defined $_[1] or ref $_[1] or not $_[1] =~ /^\d+$/)
586 0 0 if ($$self{'run'}) { }
611 0 0 if ($select)
613 0 0 unless (defined $pipe)
622 0 0 unless (defined $pid)
625 0 0 if (not $pid) { }
630 0 0 if (defined $$self{'umask'})
632 0 0 unless (defined $ret)
636 0 0 if (defined $$self{'wd'})
638 0 0 unless (defined $ret)
642 0 0 unless $$self{'env'}
0 0 if (keys %{{} unless $$self{'env'};})
648 0 0 if ($$self{'stdin'}[0] eq 'file') { }
649 0 0 unless (open STDIN, '<&', $$self{'stdin'}[1])
655 0 0 unless (open STDIN, '<&', $$self{'stdin'}[2])
660 0 0 if ($$self{'stdout'}[0] eq 'file') { }
661 0 0 unless (open STDOUT, '>>&', $$self{'stdout'}[1])
667 0 0 unless (open STDOUT, '>>&', $$self{'stdout'}[2])
672 0 0 if ($$self{'stderr'}[0] eq 'file') { }
673 0 0 unless (open STDERR, '>>&', $$self{'stderr'}[1])
679 0 0 unless (open STDERR, '>>&', $$self{'stderr'}[2])
697 0 0 if ($$self{$fh}[0] eq 'file') { }
698 0 0 if ($$self{$fh}[2])
704 0 0 if ($fh eq 'stdin') { }
734 0 0 if ($$self{'stdin'}[0] ne 'file')
740 0 0 if ($$self{$fh}[0] ne 'file')
749 0 0 if ($$self{'stdin'}[0] ne 'file' and vec $wout, fileno $$self{'stdin'}[2], 1)
750 0 0 if ($$self{'stdin'}[0] eq 'plain') { }
0 0 elsif ($$self{'stdin'}[0] eq 'scalarref') { }
0 0 elsif ($$self{'stdin'}[0] eq 'coderef') { }
752 0 0 if ($length)
753 0 0 if $length > $IPC::ShellCmd::BufferLength
757 0 0 unless (defined $rc)
763 0 0 unless (length $$self{'stdin'}[1])
770 0 0 unless defined $$self{'stdin'}[3]
772 0 0 if ($length)
773 0 0 if $length > $IPC::ShellCmd::BufferLength
778 0 0 unless (defined $rc)
784 0 0 if (length ${$$self{'stdin'}[1];} == $$self{'stdin'}[3])
791 0 0 unless defined $$self{'stdin'}[3]
794 0 0 unless defined $$self{'stdin'}[4]
798 0 0 if (not $finished and length $$self{'stdin'}[3] < $IPC::ShellCmd::BufferLength)
800 0 0 unless (defined $data)
805 0 0 if (length $$self{'stdin'}[3] > $IPC::ShellCmd::BufferLength)
811 0 0 if (length $$self{'stdin'}[3])
814 0 0 unless (defined $rc)
823 0 0 if ($finished and not length $$self{'stdin'}[3])
832 0 0 if ($$self{$fh}[0] ne 'file' and vec $rout, fileno $$self{$fh}[2], 1)
836 0 0 unless (defined $rc)
839 0 0 if (not $rc) { }
845 0 0 if ($$self{$fh}[0] eq 'scalarref') { }
0 0 elsif ($$self{$fh}[0] eq 'coderef') { }
855 0 0 if (not defined $$self{'status'} and waitpid $pid, 1)
862 0 0 unless ($rin =~ /[^\0]/ or $win =~ /[^\0]/ or defined $$self{'status'})
866 0 0 if (defined $rc) { }
880 0 0 unless ($$self{$fh})
891 0 0 if ($type ne 'plain' and $type ne 'coderef' and $type ne 'scalarref' and $type ne 'file') { }
0 0 elsif ($type eq 'plain' and $fh ne 'stdin') { }
901 0 0 if ($type eq 'plain' or $type eq 'coderef' or $type eq 'scalarref') { }
902 0 0 unless ($select)
907 0 0 if ($select)
922 0 0 if ($$self{$fh} and $$self{$fh}[0] eq 'filename')
929 0 0 unless $$self{'chain'}
933 0 0 if ($count == 1)
934 0 0 if (defined $$self{'wd'})
938 0 0 if (keys %{$$self{'env'};})
942 0 0 if (defined $$self{'umask'})
949 0 0 if ($$file{$fh} and $$el{'opt'}{$fh})
967 0 0 unless ($$self{'stdin'})
972 0 0 unless ($$self{$fh})
983 0 0 if ($$self{$fh} and $$self{$fh}[0] eq 'filename') { }
0 0 elsif ($$self{$fh} and $$self{$fh}[0] eq 'fd') { }
985 0 0 $fh eq 'stdin' ? :
0 0 if (open $pfh, $fh eq 'stdin' ? '<' : '>>', $$self{$fh}[1]) { }
994 0 0 $fh eq 'stdin' ? :
0 0 if (open $pfh, $fh eq 'stdin' ? '<&=' : '>>&=', $$self{$fh}[1]) { }