Branch Coverage

blib/lib/Log/Log4perl/Layout/PatternLayout.pm
Criterion Covered Total %
branch 101 126 80.1


line true false branch
30 70 0 if (Log::Log4perl::Util::module_available("Sys::Hostname"))
46 106 109 ref $_[0] eq 'HASH' ? :
47 112 103 @_ ? :
59 15 200 exists $options->{'undef_column_value'} ? :
66 99 116 if (exists $options->{'ConversionPattern'}{'value'})
70 1 214 if (exists $options->{'message_chomp_before_newline'}) { }
109 55 158 if ($self->{'message_chomp_before_newline'} and $format =~ /%m%n/) { }
130 1 559 if $op eq "%"
135 49 510 if ($op eq 'd') { }
192 318 elsif ($op eq 'm') { }
136 5 44 if (defined $curlies) { }
159 6 186 if (defined $curlies and length $curlies)
176 0 338 unless defined $caller_level
182 117 221 if $self->{'message_chompable'}
188 1 244 if ($self->{'info_needed'}{'L'} or $self->{'info_needed'}{'F'} or $self->{'info_needed'}{'C'} or $self->{'info_needed'}{'l'} or $self->{'info_needed'}{'M'} or $self->{'info_needed'}{'T'} or 0)
205 19 75 unless (defined $bitmask)
211 76 114 unless defined $_
219 6 58 if ($self->{'info_needed'}{'M'} or $self->{'info_needed'}{'l'} or 0)
234 7 36 if (defined $subroutine and $subroutine eq "(eval)")
241 20 16 unless $subroutine
249 4 334 if $self->{'info_needed'}{'x'}
259 53 285 if ($self->{'info_needed'}{'r'} or $self->{'info_needed'}{'R'})
260 0 4 unless ($TIME_HIRES_AVAILABLE_WARNED++ or $self->{'timer'}->hires_available)
267 53 285 if ($self->{'info_needed'}{'r'})
270 8 330 if ($self->{'info_needed'}{'R'})
275 3 335 if ($self->{'info_needed'}{'T'})
295 35 1105 if (exists $self->{'USER_DEFINED_CSPECS'}{$op}) { }
1105 0 elsif (exists $info{$op}) { }
296 0 35 unless $self->{'info_needed'}{$op}
303 436 669 if ($curlies) { }
308 0 669 if ($op eq "d")
317 3 1137 unless defined $result
322 2 336 if (scalar @results == 1 and not defined $results[0])
335 1 435 if ($ops eq 'c') { }
0 435 elsif ($ops eq 'C') { }
6 429 elsif ($ops eq 'X') { }
109 320 elsif ($ops eq 'd') { }
2 318 elsif ($ops eq 'M') { }
288 30 elsif ($ops eq 'm') { }
28 2 elsif ($ops eq 'F') { }
2 0 elsif ($ops eq 'p') { }
346 4 284 if (exists $curlies->{'chomp'})
349 5 283 if (exists $curlies->{'indent'})
350 2 3 if (defined $curlies->{'indent'}) { }
363 27 1 if (@parts > $curlies)
381 3 0 if (@components > $len)
396 0 4 unless ($Log::Log4perl::ALLOW_CODE_IN_CONFIG_FILE)
403 0 4 unless $letter =~ /^[a-zA-Z]$/
406 0 4 unless $perlcode
410 0 4 if $CSPECS =~ /$letter/
414 1 3 if (ref $perlcode eq 'CODE') { }
3 0 elsif (not ref $perlcode) { }
422 0 2 if ($@)
432 0 2 unless ref $GLOBAL_USER_DEFINED_CSPECS{$letter} eq "CODE"
448 1 10 unless ($Log::Log4perl::ALLOW_CODE_IN_CONFIG_FILE)
453 0 10 unless $letter =~ /^[a-zA-Z]$/
456 0 10 unless $perlcode
460 0 10 if $CSPECS =~ /$letter/
464 0 10 if (ref $perlcode eq 'CODE') { }
10 0 elsif (not ref $perlcode) { }
473 0 9 if ($@)
482 0 9 unless ref $self->{'USER_DEFINED_CSPECS'}{$letter} eq "CODE"
518 0 0 defined $info->[$i] ? :