Branch Coverage

blib/lib/Mojo/IOLoop/ReadWriteFork.pm
Criterion Covered Total %
branch 53 86 61.6


line true false branch
28 4 4 unless +(shift())->{'pid'}
33 0 3 $_[0] eq 'stdout' ? :
34 0 3 unless my $fh = delete $self->{$what}
35 0 3 unless $fh->close
40 23 9 ref $_[-1] eq 'HASH' ? :
66 34 4 ref $_[0] ? :
73 2 36 unless $args->{'program'}
83 11 25 if ($args->{'conduit'} eq 'pipe') { }
25 0 elsif ($args->{'conduit'} eq 'pty') { }
95 2 34 if ($args->{'stderr'})
111 0 36 unless defined($self->{'pid'} = fork)
113 33 3 $self->{'pid'} ? :
120 2 1 if (&blessed($stdin->[1]) and $stdin->[1]->isa("IO::Pty"))
123 0 2 if $args->{'raw'}
124 0 2 if $args->{'clone_winsize_from'}
129 0 3 unless open STDIN, "<&" . fileno($stdin->[0])
130 3 0 if $stdout_no
131 3 0 if $stderr_no
132 3 0 $stdout_no ? :
133 3 0 $stderr_no ? :
137 0 3 if $stderr->[0]
142 0 3 if (ref $args->{'program'} eq 'CODE') { }
145 0 0 unless $args->{'program_args'}
146 0 0 $@ ? :
147 0 0 if length $@
150 0 3 unless $args->{'program_args'}
164 23 10 if &blessed($stdout->[0]) and $stdout->[0]->isa("IO::Pty")
165 2 31 if $stderr->[0]
166 32 1 if not $stderr->[0] or $args->{'stdout'}
176 3 3 if $cb
178 2 4 if $self->{'stdin_write'}
185 0 0 unless my $pid = $self->{'pid'}
191 0 0 if $! == 11 or $! == 4 or $! == 11
192 0 0 if $! == 104 or $! == 32
201 33 32 if $self->{'wait_eof'} or $self->{'wait_sigchld'}
208 1 37 unless eval { do { $self->$cb(@$self{"exit_value", "signal"}); 1 } }
216 3 31 $args->{'stderr'} ? :
230 0 24 unless pipe $rw[0], $rw[1]
246 0 22 if $! != 5
255 29 6 unless length $self->{'stdin_buffer'}
258 0 6 unless defined $written
262 0 6 if (length $self->{'stdin_buffer'}) { }
266 0 0 if $self