Branch Coverage

blib/lib/Mojo/Run3.pm
Criterion Covered Total %
branch 62 88 70.4


line true false branch
33 1 130 if $conduit eq "other"
36 62 68 unless my $handle = $fh->{$conduit}
50 14 3 $self->{'pid'} ? :
66 26 0 if $self
73 5 5 if $cb
81 11 13 unless $self->{'pid'}
83 13 0 if $signal
90 48 23 if keys %{$$self{"watching"};}
94 0 23 unless eval { do { $self->$cb; 1 } }
102 1 0 if $self->pid != 0
109 0 0 if fileno STDIN == $fileno
110 0 0 if fileno STDOUT == $fileno
111 0 0 if fileno STDERR == $fileno
136 271 56 if ($n_bytes) { }
39 17 elsif (defined $n_bytes) { }
145 1 13 if $! == 11 or $! == 4 or $! == 11
146 2 11 if $! == 104 or $! == 32
147 9 2 if $! == 5
154 1 5 unless $virtual
165 169 135 unless $fh->{$name} and $fh->{$name} eq $handle
167 78 57 if $delete
178 4 22 unless ref $options
184 12 90 if ($driver eq 'pty') { }
62 28 elsif ($driver eq 'pipe') { }
189 1 61 unless pipe my $read, my $write
190 19 42 $conduit eq 'stdin' ? :
197 3 22 unless ($self->{'pid'} = fork)
198 1 2 unless defined $self->{'pid'}
200 1 0 if $pty and $options->{'make_slave_controlling_terminal'} // 1
211 0 0 $@ ? :
212 0 0 if length $err
213 0 0 unless POSIX::_exit($errno)
218 9 13 if $pty
225 14 52 unless my $fh = $parent{$conduit}
226 5 47 if $uniq{$fh}++
227 316 0 $self ? :
236 0 22 unless $self
248 38 16 unless length $self->{'buffer'}{$conduit}
249 8 8 unless my $fh = $self->{'fh'}{$conduit}
252 8 0 if (defined $n_bytes) { }
255 8 0 unless length $self->{'buffer'}{$conduit}
260 0 0 if $! == 11 or $! == 4 or $! == 11
261 0 0 if $! == 104 or $! == 32
266 22 0 unless ${^GLOBAL_PHASE} eq "DESTRUCT"