line |
l |
!l&&r |
!l&&!r |
condition |
22
|
24 |
8 |
0 |
$$self{'_logfh'} ||= do {
my $logfh;
my $logfile = $$self{'logfile'};
if ($logfile) {
die "failed to open file:${logfile}:$!" unless open $logfh, '>>', $logfile;
}
else {
($logfh, $logfile) = tempfile('UNLINK', 1);
$self->logfile($logfile);
};
$logfh->autoflush(1);
print $logfh '------------------------------------------------------------------------------', "\n";
$self->logpos(tell $logfh);
die "failed to obtain position of logfile:$!" if $self->logpos == -1;
die "cannot seek within logfile:$!" unless seek $logfh, $self->logpos, 0;
$logfh
} |
53
|
0 |
8 |
0 |
$$self{'command_str'} ||= join(' ', @{$self->command;}) |
111
|
8 |
0 |
1 |
not $exit_code or $exit_code < 0 |
119
|
7 |
0 |
1 |
not $exit_code or $exit_code < 0 |
128
|
0 |
8 |
0 |
$$self{'result_line'} ||= do {
my $exit_code = $self->exit_code;
if ($exit_code == -1) {
"failed to execute command:$!";
}
elsif ($self->child_signal) {
'command died with signal:' . $self->child_signal;
}
else {
'command exited with code:' . $self->child_exit_code;
}
} |
145
|
2 |
5 |
0 |
$$self{'report'} ||= do {
die "failed to open @{[$self->logfile];}:$!" unless open my $fh, '<', $self->logfile;
die "failed to seek to the appropriate position in logfile:$!" unless seek $fh, $self->logpos, 0;
my $report = '';
$report .= $_ while defined($_ = <$fh>);
$report
} |
158
|
1 |
6 |
0 |
$self->common_reporter || () |
165
|
0 |
1 |
0 |
$self->common_reporter || () |
182
|
2 |
7 |
0 |
$arg || () |
205
|
3 |
4 |
0 |
$arg || () |
217
|
0 |
0 |
14 |
$class =~ s/^\+// or $class =~ /^$prefix/ |