line |
l |
!l&&r |
!l&&!r |
condition |
23
|
39 |
13 |
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
} |
54
|
2 |
13 |
0 |
$$self{'command_str'} ||= join(' ', @{$self->command;}) |
118
|
15 |
0 |
1 |
not $exit_code or $exit_code < 0 |
126
|
14 |
0 |
1 |
not $exit_code or $exit_code < 0 |
135
|
2 |
13 |
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;
}
} |
152
|
2 |
8 |
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
} |
190
|
1 |
11 |
0 |
$self->common_reporter || () |
197
|
0 |
1 |
0 |
$self->common_reporter || () |
213
|
5 |
10 |
0 |
$arg || () |
248
|
5 |
1 |
3 |
ref $stuffs[0] || $plugin_class eq 'Command' |
251
|
6 |
4 |
0 |
$arg || () |
263
|
0 |
0 |
20 |
$class =~ s/^\+// or $class =~ /^$prefix/ |