Condition Coverage

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


and 3 conditions

line !l l&&!r l&&r condition
147 0 1 0 $IPC::Cmd::WARN && $verbose
175 0 101 40 $IPC::Cmd::WARN && $verbose
192 200 0 0 $IPC::Cmd::USE_IPC_RUN and $self->can_use_ipc_run
193 100 0 100 $IPC::Cmd::USE_IPC_OPEN3 and $self->can_use_ipc_open3
247 0 6 48 $dir and -d $dir
252 6 0 0 wantarray and $IPC::Cmd::INSTANCES
545 0 0 0 $child_in and $child_out->opened
0 0 0 $child_in and $child_out->opened and $opts->{'child_stdin'}
623 0 0 0 $waitpid ne 0 and $waitpid ne -1
1005 6499 108 106 $waitpid ne 0 and $waitpid ne -1
1077 7111 0 2 $opts->{'stdout_handler'} and ref $opts->{'stdout_handler'} eq 'CODE'
1087 109 0 2 $opts->{'stderr_handler'} and ref $opts->{'stderr_handler'} eq 'CODE'
1102 6713 0 0 $opts->{'wait_loop_callback'} and ref $opts->{'wait_loop_callback'} eq 'CODE'
1170 5 0 103 $o->{'stdout'} and not $opts->{'non_empty_stdout_ok'}
1203 0 0 0 $opts->{'child_BEGIN'} and ref $opts->{'child_BEGIN'} eq 'CODE'
1246 0 0 0 $opts->{'child_END'} and ref $opts->{'child_END'} eq 'CODE'
1343 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)
1384 0 0 0 $@ and ref $@
0 0 0 $@ and ref $@ and $@->isa('IPC::Cmd::TimeOut')
1533 40 0 0 $@ and $@ =~ /^open3:/
1574 80 8 32 $len and $h == $kidout
1575 80 32 8 $len and $h == $kiderror
1579 48 32 40 $h == $kidout and $len == 0
1580 72 8 40 $h == $kiderror and $len == 0
1581 40 40 40 $stdout_done and $stderr_done
1698 0 0 0 $@ and not UNIVERSAL::isa($@, 'IPC::Cmd::TimeOut')
1750 40 24 16 ref $cmd and grep {$sc_lookup{$_};} @$cmd
1757 16 0 0 $IPC::Cmd::DEBUG and $fixed
1779 0 0 0 scalar @args == 1 && UNIVERSAL::isa($args[0], 'ARRAY')
1820 0 0 0 defined $_ and length $_
1830 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
1850 0 0 0 defined $arg and length $arg
1860 0 0 0 defined $arg and length $arg

or 2 conditions

line l !l condition
40 0 2 $@ || 1
141 0 1 shift() || 0
167 40 101 shift() || 0
570 0 0 ($child_out->stat)[11] || 1024
0 0 ($child_err->stat)[11] || 1024
900 108 0 ($child_stdout_socket->stat)[11] || 1024
108 0 ($child_stderr_socket->stat)[11] || 1024
108 0 ($child_info_socket->stat)[11] || 1024
1030 6000 1222 $2 || ''
1491 0 40 shift() || 0
1718 0 40 shift() || 0
1939 0 0 shift() || 0

or 3 conditions

line l !l&&r !l&&!r condition
395 0 0 0 $time_diff > 5 or $time_diff < 0
421 0 0 0 not ref $handler_code or ref $handler_code ne 'CODE'
587 0 0 0 $s eq '__WARN__' or $s eq '__DIE__'
683 0 0 0 $opts->{'parent_stdout'} or $opts->{'parent_stderr'}
886 108 0 0 fcntl($child_stdout_socket, 3, 0) || Carp::confess("can't fnctl F_GETFL: $!")
890 108 0 0 fcntl($child_stderr_socket, 3, 0) || Carp::confess("can't fnctl F_GETFL: $!")
894 108 0 0 fcntl($child_info_socket, 3, 0) || Carp::confess("can't fnctl F_GETFL: $!")
1226 0 0 0 $parent_stdout_socket || Carp::confess("Unable to reopen STDOUT: $!\n")
1227 0 0 0 $parent_stderr_socket || Carp::confess("Unable to reopen STDERR: $!\n")
1784 0 0 0 $got_arrayref or scalar @args > 1
1830 0 0 0 $i + 2 == length $_ || substr($_, $i + 2, 1) eq ' '