Branch Coverage

blib/lib/Mojo/Run.pm
Criterion Covered Total %
branch 0 124 0.0


line true false branch
29 0 0 unless pipe $r, $w
34 0 0 unless socketpair my $fh1, my $fh2, 1, 1, 0
46 0 0 if defined $_obj
66 0 0 if defined $level
74 0 0 unless (defined $self and blessed $self and $self->isa('Mojo::Run'))
81 0 0 if ($self->max_forks > 0 and $self->num_forks >= $self->max_forks)
90 0 0 unless $self->_validateRunStruct($proc)
92 0 0 $$proc{'exec_timeout'} > 0 ? :
109 0 0 if ($pid) { }
118 0 0 if (defined $$proc{'exec_timeout'} and $$proc{'exec_timeout'} > 0)
151 0 0 if (tied *STDOUT)
155 0 0 if (tied *STDERR)
161 0 0 unless open STDOUT, '>&' . fileno($stdout_p)
164 0 0 unless open STDERR, '>&' . fileno($stderr_p)
170 0 0 if (ref $$proc{'cmd'} eq 'CODE') { }
173 0 0 if ($@)
181 0 0 ref $$proc{'cmd'} eq 'ARRAY' ? :
0 0 unless (exec ref $$proc{'cmd'} eq 'ARRAY' ? @{$$proc{'cmd'};} : $$proc{'cmd'})
206 0 0 unless $proc
207 0 0 unless $io ~~ ['stdout', 'stderr', 'stdres']
208 0 0 unless $$proc{"hdr_$io"}
216 0 0 unless defined $len or $! != 4
218 0 0 unless ($len)
223 0 0 if (defined $$proc{"${io}_cb"}) { }
228 0 0 if ($@)
245 0 0 unless $proc
247 0 0 unless $$proc{"hdr_$io"}
265 0 0 unless (defined $pid)
270 0 0 unless (exists $$self{'_data'}{$pid} and defined $$self{'_data'}{$pid})
285 0 0 unless (defined $proc)
290 0 0 if $$proc{'cleanup'}
294 0 0 $core ? :
299 0 0 if (defined $$proc{'id_timeout'})
303 0 0 if ($$proc{'hard_kill'})
305 0 0 if $$proc{"hdr_$_"}
328 0 0 if not $force and $$proc{'running'} || defined $$proc{'hdr_stdout'} || defined $$proc{'hdr_stdres'} || defined $$proc{'hdr_stderr'}
337 0 0 if ($proc and %$proc)
343 0 0 if (defined $$proc{'exit_cb'} and ref $$proc{'exit_cb'} eq 'CODE') { }
344 0 0 $$proc{'buf_stdres'} ? :
346 0 0 if ($@)
353 0 0 ref $$proc{'cmd'} eq 'ARRAY' ? :
0 0 ref $$proc{'cmd'} eq 'CODE' ? :
0 0 $$proc{'buf_stderr'} ? :
0 0 $$proc{'stderr'} ? :
373 0 0 if $@
399 0 0 if $i > 0
434 0 0 unless defined $$s{'cmd'}
439 0 0 if $cmd_ref eq '' and length $$s{'cmd'} == 0
442 0 0 if $cmd_ref ne '' and not $cmd_ref ~~ ['CODE', 'ARRAY']
446 0 0 if defined $$s{'stdout_cb'} and ref $$s{'stdout_cb'} ne 'CODE'
449 0 0 if defined $$s{'stderr_cb'} and ref $$s{'stderr_cb'} ne 'CODE'
452 0 0 if defined $$s{'exit_cb'} and ref $$s{'exit_cb'} ne 'CODE'
465 0 0 unless $proc
468 0 0 if (defined $$proc{'id_timeout'})
474 0 0 unless CORE::kill 0, $pid
484 0 0 unless (CORE::kill 9, $pid)
495 0 0 unless defined $signal
498 0 0 unless $proc
501 0 0 unless (CORE::kill $signal, $pid)
513 0 0 unless ($self->is_child)
517 0 0 if $self->log
521 0 0 unless defined $self->ioloop