Branch Coverage

blib/lib/Parse/Syslog/Line.pm
Criterion Covered Total %
branch 72 90 80.0


line true false branch
159 9 74 $PruneEmpty ? :
160 74 9 unless $PruneRaw
164 54 29 if ($raw_string =~ s/$RE{'preamble'}//o)
180 3 80 if ($raw_string =~ s/$RE{'year'}//o)
183 65 18 if ($raw_string =~ s/$RE{'date'}//o) { }
18 0 elsif ($raw_string =~ s/$RE{'date_iso8601'}//o) { }
185 3 62 if $year
191 83 0 if (exists $msg{'datetime_raw'} and length $msg{'datetime_raw'})
194 83 0 if ($DateParsing)
196 20 63 if ($FmtDate and ref $FmtDate eq 'CODE') { }
205 10 53 $diff > 0 ? :
206 46 8 $SYSLOG_TIMEZONE eq 'UTC' ? :
54 9 $OutputTimeZone ? :
210 3 60 $NormalizeToUTC ? :
215 51 9 $parts[1] =~ /([Z+\-].*)/ ? :
3 60 $NormalizeToUTC ? :
223 0 63 if $ENV{'DEBUG_PARSE_SYSLOG_LINE'}
226 6 77 if ($DateTimeCreate)
227 1 5 unless ($DateTimeTried and &is_loaded('DateTime'))
232 0 1 unless (eval { do { &load('DateTime'); 1 } })
239 6 0 if $DateTimeCreate
241 6 0 if $SYSLOG_TIMEZONE
250 80 3 if ($raw_string =~ s/$RE{'host'}//o)
253 21 59 if (defined $ip and length $ip) { }
59 0 elsif (length $hostStr) { }
264 23 60 if ($raw_string =~ s/$RE{'cisco_hates_you'}//o)
266 17 6 if ($raw_string =~ s/$RE{'date_long'}//o)
268 6 11 if (my $ntp = $1) { }
269 3 0 $ntp eq '*' ? :
3 3 $ntp eq '.' ? :
281 63 20 if ($ExtractProgram) { }
282 57 6 if ($raw_string =~ s/$RE{'program_raw'}//o) { }
6 0 elsif ($raw_string =~ s/$RE{'program_netapp'}//o) { }
285 57 0 if (defined $progStr and length $progStr)
286 57 0 if (($msg{'program_name'}) = $progStr =~ /$RE{'program_name'}/o)
287 14 43 if (length $msg{'program_name'} != length $msg{'program_raw'})
289 7 7 unless ($msg{'program_pid'}) = $progStr =~ /$RE{'program_pid'}/o
301 0 0 if (not exists $msg{'priority'} and exists $LOG_PRIORITY{$level})
315 63 20 defined $msg{'program_raw'} ? :
317 9 74 if ($PruneRaw)
320 9 74 if ($PruneEmpty)
323 0 83 if (@PruneFields)
327 0 83 if exists $msg{'epoch'} and not $EpochCreate
366 8 0 if (defined $tz_name and !exists $ENV{'TZ'} || $tz_name ne $ENV{'TZ'})
375 0 8 if $ENV{'DEBUG_PARSE_SYSLOG_LINE'}