Condition Coverage

lib/IPC/Cmd.pm
Criterion Covered Total %
condition 56 180 31.1


and 3 conditions

line !l l&&!r l&&r condition
148 0 1 0 $IPC::Cmd::WARN && $verbose
176 0 101 40 $IPC::Cmd::WARN && $verbose
193 200 0 0 $IPC::Cmd::USE_IPC_RUN and $self->can_use_ipc_run
194 100 0 100 $IPC::Cmd::USE_IPC_OPEN3 and $self->can_use_ipc_open3
248 0 6 48 $dir and -d $dir
253 6 0 0 wantarray and $IPC::Cmd::INSTANCES
550 0 0 0 $child_in and $child_out->opened
0 0 0 $child_in and $child_out->opened and $opts->{'child_stdin'}
628 0 0 0 $waitpid ne 0 and $waitpid ne -1
1011 6336 108 106 $waitpid ne 0 and $waitpid ne -1
1083 7111 0 2 $opts->{'stdout_handler'} and ref $opts->{'stdout_handler'} eq 'CODE'
1093 109 0 2 $opts->{'stderr_handler'} and ref $opts->{'stderr_handler'} eq 'CODE'
1108 6550 0 0 $opts->{'wait_loop_callback'} and ref $opts->{'wait_loop_callback'} eq 'CODE'
1176 5 0 103 $o->{'stdout'} and not $opts->{'non_empty_stdout_ok'}
1209 0 0 0 $opts->{'child_BEGIN'} and ref $opts->{'child_BEGIN'} eq 'CODE'
1253 0 0 0 $opts->{'child_END'} and ref $opts->{'child_END'} eq 'CODE'
1350 80 0 0 $IPC::Cmd::USE_IPC_RUN and $self->can_use_ipc_run(1)
40 0 40 $IPC::Cmd::USE_IPC_OPEN3 and $self->can_use_ipc_open3(1)
1391 0 0 0 $@ and ref $@
0 0 0 $@ and ref $@ and $@->isa('IPC::Cmd::TimeOut')
1540 40 0 0 $@ and $@ =~ /^open3:/
1581 80 8 32 $len and $h == $kidout
1582 80 32 8 $len and $h == $kiderror
1586 48 32 40 $h == $kidout and $len == 0
1587 72 8 40 $h == $kiderror and $len == 0
1588 41 39 40 $stdout_done and $stderr_done
1705 0 0 0 $@ and not UNIVERSAL::isa($@, 'IPC::Cmd::TimeOut')
1757 40 24 16 ref $cmd and grep {$sc_lookup{$_};} @$cmd
1764 16 0 0 $IPC::Cmd::DEBUG and $fixed
1786 0 0 0 scalar @args == 1 && UNIVERSAL::isa($args[0], 'ARRAY')
1827 0 0 0 defined $_ and length $_
1837 0 0 0 $ch eq '\\' and $next_ch eq '"'
0 0 0 $ch eq '\\' and $next_ch eq '\\'
0 0 0 $ch eq '"' and $next_ch eq '"'
0 0 0 $ch eq '"' and $next_ch eq '"' and $quote_mode
0 0 0 $ch eq '"' and $next_ch eq '"'
0 0 0 $ch eq '"' and $next_ch eq '"' and not $quote_mode
0 0 0 $ch eq '"' and $next_ch eq '"' and not $quote_mode and $i + 2 == length $_ || substr($_, $i + 2, 1) eq ' '
0 0 0 $ch eq ' ' and not $quote_mode
1857 0 0 0 defined $arg and length $arg
1867 0 0 0 defined $arg and length $arg

or 2 conditions

line l !l condition
41 0 2 $@ || 1
142 0 1 shift() || 0
168 40 101 shift() || 0
575 0 0 ($child_out->stat)[11] || 1024
0 0 ($child_err->stat)[11] || 1024
906 108 0 ($child_stdout_socket->stat)[11] || 1024
108 0 ($child_stderr_socket->stat)[11] || 1024
108 0 ($child_info_socket->stat)[11] || 1024
1036 6000 1222 $2 || ''
1498 0 40 shift() || 0
1725 0 40 shift() || 0
1946 0 0 shift() || 0

or 3 conditions

line l !l&&r !l&&!r condition
396 0 0 0 $time_diff > 5 or $time_diff < 0
422 0 0 0 not ref $handler_code or ref $handler_code ne 'CODE'
592 0 0 0 $s eq '__WARN__' or $s eq '__DIE__'
688 0 0 0 $opts->{'parent_stdout'} or $opts->{'parent_stderr'}
892 108 0 0 fcntl($child_stdout_socket, 3, 0) || Carp::confess("can't fnctl F_GETFL: $!")
896 108 0 0 fcntl($child_stderr_socket, 3, 0) || Carp::confess("can't fnctl F_GETFL: $!")
900 108 0 0 fcntl($child_info_socket, 3, 0) || Carp::confess("can't fnctl F_GETFL: $!")
1233 0 0 0 $parent_stdout_socket || Carp::confess("Unable to reopen STDOUT: $!\n")
1234 0 0 0 $parent_stderr_socket || Carp::confess("Unable to reopen STDERR: $!\n")
1791 0 0 0 $got_arrayref or scalar @args > 1
1837 0 0 0 $i + 2 == length $_ || substr($_, $i + 2, 1) eq ' '