Branch Coverage

blib/lib/Command/Runner.pm
Criterion Covered Total %
branch 53 100 53.0


line true false branch
25 0 39 if $command and $commandf
26 15 24 $command ? :
32 0 39 if $commandf
56 16 23 if (ref $command eq 'CODE') { }
69 5 11 if ($self->{'redirect'}) { }
75 16 0 if (length $stdout and my $sub = $self->{'stdout'})
80 11 0 if (not $self->{'redirect'} and length $stderr and my $sub = $self->{'stderr'})
86 13 3 if ($self->{'keep'})
98 0 16 if ($self->{'env'} or $self->{'cwd'})
100 0 0 if $self->{'env'}
101 0 0 if $self->{'cwd'}
106 15 1 unless ($self->{'timeout'})
107 0 15 $wrap_code ? :
117 0 1 $wrap_code ? :
122 0 1 if (not $err) { }
1 0 elsif ($err eq "__TIMEOUT__\n") { }
135 0 0 if (ref $command) { }
137 0 0 if $self->{'env'}
138 0 0 if $self->{'cwd'}
141 0 0 if $self->{'env'}
142 0 0 if $self->{'cwd'}
146 0 0 $self->{'timeout'} ? :
150 0 0 if ($INT)
156 0 0 if ($res == -1) { }
0 0 elsif ($res > 0) { }
163 0 0 if ($timeout and my $signal = $timeout->signal)
179 19 4 unless ($self->{'redirect'})
185 0 23 unless defined $pid
186 7 16 if ($pid == 0)
189 1 6 if ($self->{'redirect'}) { }
194 7 0 if ($Config::Config{'d_setpgrp'})
195 0 7 unless POSIX::setpgid(0, 0)
198 0 7 if ($self->{'cwd'})
199 0 0 unless chdir $self->{'cwd'}
201 0 7 if ($self->{'env'})
205 7 0 if (ref $command) { }
214 16 0 $Config::Config{'d_setpgrp'} ? :
217 4 12 $self->{'timeout'} ? :
221 0 386 if ($INT)
225 5 381 if ($timeout and my $signal = $timeout->signal)
229 32 26 $ready == $stdout_read ? :
231 29 29 if ($len) { }
234 0 29 unless my(@line) = $buffer->get
235 6 23 unless my $sub = $self->{$type}
238 0 29 unless defined $len
245 6 26 unless my $sub = $self->{$type}
246 3 23 unless my $buffer = $self->{'_buffer'}{$type}
247 23 0 unless my(@line) = $buffer->get(1)
257 16 0 $self->{'_buffer'}{'stdout'} ? :
13 3 $self->{'_buffer'}{'stderr'} ? :