Branch Coverage

blib/lib/IPC/Run3/Shell.pm
Criterion Covered Total %
branch 133 146 91.1


line true false branch
31 16 0 unless $DEBUG
33 0 0 unless $DEBUG
34 0 0 ref $DEBUG eq 'GLOB' ? :
55 0 12 if $IPC::Run3::Shell::DEBUG
85 2 27 if (not defined $exp) { }
8 19 elsif (not ref $exp and $exp and my($sym) = $exp =~ /^:(\w+)$/) { }
90 5 3 if ($sym eq 'run') { }
92 0 5 if $DEBUG
97 1 2 unless $EXPORTABLE{$sym}
99 0 2 if $DEBUG
105 13 6 ref $exp eq 'ARRAY' ? :
106 3 16 unless $sym
108 1 14 unless @cmd
109 0 14 if $DEBUG
119 1 52 if $omcmd[0] and $omcmd[0] eq 'IPC::Run3::Shell'
125 116 72 blessed($acmd[0]) && $acmd[0]->isa($OBJECT_PACKAGE) ? :
134 45 143 if (exists $opt{'__TEST_OPT_A'} or exists $opt{'__TEST_OPT_B'})
135 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'} ? :
141 3 110 unless $KNOWN_OPTS{$_}
144 20 122 defined $opt{'allow_exit'} ? :
145 138 4 if ($allow_exit ne 'ANY')
146 4 134 unless ref $allow_exit eq 'ARRAY'
147 1 137 unless @$allow_exit
151 4 1 defined $_ ? :
5 139 unless looks_like_number $_
159 1 139 if exists $opt{'stderr'} and $opt{'fail_on_stderr'}
161 1 138 if $opt{'both'} and exists $opt{'stdout'}
163 1 137 if $opt{'both'} and exists $opt{'stderr'}
165 1 136 if $opt{'both'} and $opt{'fail_on_stderr'}
169 1 135 unless @fcmd
175 18 109 if (exists $opt{'stdout'}) { }
9 100 elsif ($opt{'both'}) { }
10 90 elsif (wantarray) { }
48 42 elsif (defined wantarray) { }
178 8 1 defined wantarray ? :
187 6 121 if (exists $opt{'stderr'}) { }
9 112 elsif ($opt{'fail_on_stderr'}) { }
9 103 elsif ($opt{'both'}) { }
192 4 1 defined wantarray ? :
4 5 wantarray ? :
197 1 761 if exists $opt{$_}
199 0 127 if $DEBUG
200 1 4 ref $opt{'show_cmd'} eq 'GLOB' ? :
5 122 if $opt{'show_cmd'}
201 6 121 exists $opt{'irs'} ? :
203 1 126 unless IPC::Run3::run3(\@fcmd, $opt{'stdin'}, $stdout, $stderr, \%r3o)
206 5 4 if $opt{'fail_on_stderr'} and $err ne '' and $err ne $/
208 3 118 if ($? == -1) { }
4 114 elsif ($? & 127) { }
213 1 3 $? & 128 ? :
219 14 100 unless $allow_exit eq 'ANY' or grep {$_ == $exitcode;} @$allow_exit
221 31 76 unless defined wantarray
222 12 64 if (exists $opt{'stdout'}) { }
8 56 elsif ($opt{'both'}) { }
10 46 elsif (wantarray) { }
225 2 6 if $opt{'chomp'}
226 4 4 wantarray ? :
229 4 6 if $opt{'chomp'}
233 5 41 if $opt{'chomp'}
246 4 454 if (not defined $x) { }
9 445 elsif (blessed $x and overload::Overloaded($x)) { }
250 4 5 if (overload::Method($x, '""')) { }
2 3 elsif (defined(my $rv = eval { do { "$x" } })) { }
2 1 elsif ($@ =~ /\bno method found\b/) { }
264 0 2 if (not $overload::VERSION or $overload::VERSION < 1.04) { }
276 10 435 if ref $x
285 13 5 if $o
286 0 18 if (ref $c eq 'HASH') { }
292 18 0 defined $c ? :
293 6 12 if $s =~ m[[^\w\-\=/\.]]