line |
true |
false |
branch |
25
|
2 |
5 |
if defined $_[0]{'chdir'} |
28
|
5 |
1 |
exists $_[0]{'args'} ? : |
31
|
1 |
5 |
unless eval {
do {
local $SIG{'ALRM'} = sub {
die "timeout\n";
}
;
alarm($_[0]{'timeout'} || $timeout);
my $pid = open3(my $in, my $out, my $err = &gensym(), @cmd);
if (defined $_[0]{'binmode'}) {
foreach my $fh ($in, $out, $err) {
binmode $fh, $_[0]{'binmode'};
};
};
if (exists $_[0]{'stdin'}) {
print $in $_[0]{'stdin'};
close $in;
};
$stdout = do {
local $/;
readline $out
};
$stderr = do {
local $/;
readline $err
};
waitpid $pid, 0;
alarm 0;
1
}
} |
36
|
1 |
5 |
if (defined $_[0]{'binmode'}) |
39
|
1 |
5 |
if (exists $_[0]{'stdin'}) |
53
|
0 |
5 |
$? & 128 ? : |
60
|
1 |
1 |
$status->{'code'} ? : |
|
2 |
3 |
if $_[0]{'munge_status'} |
61
|
1 |
1 |
$status->{'signal'} ? : |
|
2 |
3 |
if $_[0]{'munge_signal'} |
64
|
3 |
2 |
if (exists $_[0]{'status'}) { } |
65
|
1 |
2 |
if (not defined $_[0]{'status'}) { } |
|
1 |
1 |
elsif (ref $_[0]{'status'} eq '') { } |
79
|
1 |
4 |
if (defined $_[0]{'stdout'} and ref $_[0]{'stdout'} eq 'Regexp') { } |
84
|
1 |
4 |
if (defined $_[0]{'stderr'} and ref $_[0]{'stderr'} eq 'Regexp') { } |