Condition Coverage

blib/lib/App/RunCron.pm
Criterion Covered Total %
condition 30 48 62.5


and 3 conditions

line !l l&&!r l&&r condition
174 6 2 1 ref $reporter and ref $reporter eq 'CODE'
196 7 0 4 ref $reporter and ref $reporter eq 'ARRAY'
202 1 3 3 $stuffs[0] and ref $stuffs[0]

or 2 conditions

line l !l condition
64 0 8 $self->tag || ''
157 4 3 $self->reporter || 'None'
164 0 1 $self->error_reporter || 'Stdout'

or 3 conditions

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/