Branch Coverage

blib/lib/IPC/Run3/Shell.pm
Criterion Covered Total %
branch 139 152 91.4


line true false branch
31 17 0 unless $DEBUG
33 1 0 unless $DEBUG
34 0 0 ref $DEBUG eq 'GLOB' ? :
55 0 13 if $IPC::Run3::Shell::DEBUG
85 2 29 if (not defined $exp) { }
10 19 elsif (not ref $exp and $exp and my($sym) = $exp =~ /^:(\w+)$/) { }
90 5 5 if ($sym eq 'run') { }
1 4 elsif ($sym eq 'AUTOLOAD') { }
1 3 elsif ($sym eq 'FATAL') { }
92 0 5 if $DEBUG
97 0 1 if $DEBUG
106 1 2 unless $EXPORTABLE{$sym}
108 0 2 if $DEBUG
114 13 6 ref $exp eq 'ARRAY' ? :
115 3 16 unless $sym
117 1 14 unless @cmd
118 0 14 if $DEBUG
128 1 54 if $omcmd[0] and $omcmd[0] eq 'IPC::Run3::Shell'
134 116 74 &blessed($acmd[0]) && $acmd[0]->isa($OBJECT_PACKAGE) ? :
143 45 145 if (exists $opt{'__TEST_OPT_A'} or exists $opt{'__TEST_OPT_B'})
146 33 1 defined $opt{'__TEST_OPT_A'} ? :
34 11 exists $opt{'__TEST_OPT_A'} ? :
40 1 defined $opt{'__TEST_OPT_B'} ? :
41 4 exists $opt{'__TEST_OPT_B'} ? :
151 3 110 unless $KNOWN_OPTS{$_}
153 20 124 defined $opt{'allow_exit'} ? :
154 140 4 if ($allow_exit ne 'ANY')
155 4 136 unless ref $allow_exit eq 'ARRAY'
156 1 139 unless @$allow_exit
160 4 1 defined $_ ? :
5 141 unless defined $_ and &looks_like_number($_)
169 1 7 if exists $opt{'stderr'} and $opt{'fail_on_stderr'}
171 1 11 if $opt{'both'} and exists $opt{'stdout'}
173 1 10 if $opt{'both'} and exists $opt{'stderr'}
175 1 9 if $opt{'both'} and $opt{'fail_on_stderr'}
178 1 137 unless @fcmd
184 18 111 if (exists $opt{'stdout'}) { }
9 102 elsif ($opt{'both'}) { }
10 92 elsif (wantarray) { }
48 44 elsif (defined wantarray) { }
187 8 1 defined wantarray ? :
196 6 123 if (exists $opt{'stderr'}) { }
9 114 elsif ($opt{'fail_on_stderr'}) { }
9 105 elsif ($opt{'both'}) { }
201 4 1 defined wantarray ? :
4 5 wantarray ? :
206 1 773 if exists $opt{$_}
208 0 129 if $DEBUG
209 1 4 ref $opt{'show_cmd'} eq 'GLOB' ? :
5 124 if $opt{'show_cmd'}
210 6 123 exists $opt{'irs'} ? :
212 1 128 unless IPC::Run3::run3(\@fcmd, $opt{'stdin'}, $stdout, $stderr, \%r3o)
216 5 4 if $opt{'fail_on_stderr'} and $err ne '' and $err ne $/
217 3 120 if ($? == -1) { }
4 116 elsif ($? & 127) { }
222 1 3 $? & 128 ? :
228 15 101 unless $allow_exit eq 'ANY' or grep {$_ == $exitcode;} @$allow_exit
230 32 76 unless defined wantarray
231 12 64 if (exists $opt{'stdout'}) { }
8 56 elsif ($opt{'both'}) { }
10 46 elsif (wantarray) { }
234 2 6 if $opt{'chomp'}
235 4 4 wantarray ? :
238 4 6 if $opt{'chomp'}
242 5 41 if $opt{'chomp'}
255 4 460 if (not defined $x) { }
9 451 elsif (&blessed($x) and overload::Overloaded($x)) { }
259 4 5 if (overload::Method($x, '""')) { }
2 3 elsif (defined(my $rv = eval { do { "$x" } })) { }
2 1 elsif ($@ =~ /\bno method found\b/) { }
273 0 2 if (not $overload::VERSION or $overload::VERSION < 1.04) { }
285 10 441 if ref $x
294 13 5 if $o
295 0 18 if (ref $c eq 'HASH') { }
301 18 0 defined $c ? :
302 6 12 if $s =~ m[[^\w\-\=/\.]]