Branch Coverage

blib/lib/Hardware/UPS/Perl/Logging.pm
Criterion Covered Total %
branch 8 176 4.5


line true false branch
225 0 1 @_ ? :
244 0 1 if ($refType ne 'HASH')
264 0 0 if (exists $$options{'Size'})
270 0 0 if ($arg =~ /\d+/ and $arg > 0) { }
279 0 0 if (not exists $$options{'Scheme'})
287 0 0 if (exists $ROTATION_SCHEME{$arg}) { }
300 0 0 if (exists $$options{'Period'})
306 0 0 if ($arg =~ /\d+/ and $arg > 0) { }
315 0 0 if (not exists $$options{'Scheme'})
322 0 0 if (exists $processOption{$option}) { }
335 0 1 if (defined $logFile) { }
337 0 0 if (ref $logFile eq 'GLOB') { }
361 0 0 unless ($self->_open($self->getLogFile))
368 0 0 if ($ROTATION_SCHEME{$scheme})
370 0 0 if ($scheme eq 'period') { }
432 0 0 if (exists $$self{'errorMessage'}) { }
450 0 0 if (exists $$self{'handle'}) { }
468 0 1 if (exists $$self{'logfile'}) { }
486 0 0 if (exists $$self{'period'} and defined $$self{'period'}) { }
504 0 0 if (exists $$self{'size'} and defined $$self{'size'}) { }
522 0 1 if (exists $$self{'scheme'}) { }
615 0 0 if (defined $scheme) { }
624 0 0 if (defined $fh and ref $fh eq 'FileHandle' or ref $fh eq 'GLOB') { }
630 0 0 if ($scheme)
632 0 0 unless ($alarm)
641 0 0 if ($scheme)
676 0 0 @_ ? :
694 0 0 if ($refType ne 'HASH')
701 0 0 unless (defined $formatString)
717 0 0 if (defined $type) { }
718 0 0 if (exists $processType{lc $type}) { }
735 0 0 unless (defined $arguments)
741 0 0 if (defined $scheme) { }
750 0 0 if (defined $fh and ref $fh eq 'FileHandle' or ref $fh eq 'GLOB') { }
752 0 0 if ($type) { }
763 0 0 unless ($line =~ /^(\s*)\$/msx)
796 0 0 if ($@)
803 0 0 if ($scheme)
805 0 0 unless ($alarm)
817 0 0 if ($scheme)
821 0 0 if ($fatalFlag)
850 0 0 @_ ? :
862 0 0 if (not $refType) { }
0 0 elsif ($refType eq 'HASH') { }
878 0 0 if (/^level$/)
883 0 0 if (/^message$/)
938 0 1 if (exists $$self{'mailto'}) { }
961 0 0 @_ ? :
976 0 0 if ($refType ne 'HASH')
996 0 0 if (exists $processOption{$option}) { }
1006 0 0 unless ($mailTo)
1008 0 0 unless (defined $mailTo and $mailTo)
1015 0 0 if (defined $subject and $subject) { }
1027 0 0 unless ($mailer_fh = $mail->open('sendmail'))
1032 0 0 if ($message) { }
1039 0 0 unless ($mailer_fh->close)
1058 0 0 if ($self->_close) { }
1094 0 0 if ($self->_opened($logFile))
1100 0 0 if (defined $logFile) { }
1108 0 0 unless (defined $log_fh)
1118 0 0 if ($logFileLink ne $logFile)
1120 0 0 if -w $logFileLink
1122 0 0 unless (symlink $logFile, $logFileLink)
1149 0 0 if (defined $logFile) { }
1150 0 0 if (exists $$self{$logFile}) { }
1158 0 0 if (exists $$self{'handle'}) { }
1181 0 0 if ($self->_opened($logFile)) { }
1188 0 0 if defined $logFile
1221 0 0 unless (defined $scheme)
1233 0 0 if (defined $oldTimestamp)
1235 0 0 if ($newDay ne $oldDay)
1245 0 0 if (defined $oldTimestamp and defined $period)
1246 0 0 if (abs $timestamp - $oldTimestamp >= $period)
1255 0 0 if (defined $logFile)
1257 0 0 if ($fileSize >= $self->getRotationSize)
1266 0 0 if (exists $processScheme{$scheme}) { }
1276 0 0 if ($doRotate) { }
1279 0 0 if ($self->_close) { }
1314 0 1 @_ ? :
1332 1 0 unless (defined $timestamp)
1340 0 0 if (defined $scheme and not $ROTATION_SCHEME{$scheme})
1350 0 0 if (defined $oldTimestamp) { }
1360 0 0 if (defined $oldLogFile) { }
1362 0 0 if ($daystamp eq $oldDaystamp) { }
1378 0 0 if /^$name\.[0-9]$/
1380 0 0 if (@filelist) { }
1394 0 0 if ($counter < 9) { }
1514 0 0 if (exists $$self{'_timestamp'}) { }