Branch Coverage

blib/lib/Log/Log4perl/Tiny.pm
Criterion Covered Total %
branch 157 224 70.0


line true false branch
19 0 32 if (grep {$_ eq ":full_or_fake";} @list)
22 0 0 if eval "\n package $caller;\n $sue;\n 1;\n "
33 9 290 if $done{$item}
35 218 72 if ($item =~ /^[a-zA-Z]/msx) { }
25 47 elsif ($item eq ':levels') { }
14 33 elsif ($item eq ':subs') { }
14 19 elsif ($item =~ /\A : (mimic | mask | fake) \z/msx) { }
13 6 elsif ($item eq ':easy') { }
5 1 elsif (lc $item eq ':dead_if_first') { }
1 0 elsif (lc $item eq ':no_extra_logdie_message') { }
53 12 2 unless ("Log::Log4perl"->can("easy_init"))
58 8 3 if (ref $conf) { }
2 1 elsif (defined $conf) { }
61 8 0 if exists $conf->{'level'}
63 8 0 if exists $conf->{'format'}
65 0 8 if exists $conf->{'layout'}
85 27 5 unless ($level_set)
96 8 29 ref $_[0] ? :
98 0 37 if exists $args{'layout'}
101 1 36 if (exists $args{'channels'}) { }
106 169 4 unless exists $args{$key}
112 36 1 if @$channels == 1
120 93 18 unless defined $args{$accessor}
124 29 8 unless exists $self->{'format'}
126 1 36 if (exists $args{'loglocal'})
135 37 0 @_ && ref $_[0] ? :
141 0 40 unless defined $key
143 0 40 unless defined $value
148 36 4 if ($key =~ /\A(?: fh | sub | code | channel )\z/msx) { }
2 2 elsif ($key eq 'file_append') { }
2 0 elsif ($key eq 'file_create') { }
0 0 elsif ($key =~ /\A file (?: _insecure )? \z/msx) { }
152 0 2 unless open $channel, ">>", $value
157 0 2 unless open $channel, ">", $value
162 0 0 unless open $channel, $value
171 4 36 if ($set_autoflush)
188 7 0 if exists $id_for{$level}
194 7 0 if exists $name_of{$id}
195 0 0 if exists $id_for{$id}
203 9 2 if @_
211 93 0 if (@_)
215 7 203 if (defined $_[2])
220 199 4 if (defined $_[4])
227 3 1 !defined($_[5]) || $_[5] eq '%' ? :
235 186 1395 if $type
236 1488 93 if $type ne "required"
241 186 0 length $_ ? :
269 1 107 ref $fh eq 'ARRAY' ? :
272 20 91 ref $channel eq 'CODE' ? :
279 2 131 if $self->{'level'} == $DEAD
282 23 108 if $level > $self->{'level'}
287 3 105 exists $self->{'loglocal'} ? :
299 0 0 if defined $self->{'logexit_code'}
300 0 0 if defined $Log::Log4perl::LOGEXIT_CODE
309 4 0 if $self->is_warn or $LOGDIE_MESSAGE_ON_STDERR
314 4 0 if ($LOGDIE_MESSAGE_ON_STDERR)
316 0 4 unless @message
320 4 0 if substr($message[-1], -1, 1) ne "\n"
334 1 0 if $self->is_fatal or $LOGDIE_MESSAGE_ON_STDERR
339 1 0 if ($LOGDIE_MESSAGE_ON_STDERR)
341 0 1 unless @message
345 1 0 if substr($message[-1], -1, 1) ne "\n"
374 10 0 if $emit_log or $LOGDIE_MESSAGE_ON_STDERR
377 10 0 if ($emit_log)
382 8 2 if ($LOGDIE_MESSAGE_ON_STDERR)
413 0 125 unless ref $self
414 87 38 if (@_)
416 0 87 unless exists $id_for{$level}
425 27 5 unless ($self->{'_count'})
435 0 81 defined $, ? :
8 80 ref $_ eq 'CODE' ? :
459 0 26 unless ($strftime_has_tz_offset)
481 0 13 unless defined $package
482 5 8 if $package ne $internal_package
485 0 5 if $i > $max_i
486 1 4 if $caller_depth
499 2 4 unless defined $options
505 2 4 if $flag_for{'utc'}
508 4 0 if $strftime_has_tz_offset
513 0 0 if $offset < 0
526 0 3 unless my $local = $data->{'loglocal'}
528 0 3 unless exists $local->{$key}
530 0 3 unless defined $target
531 1 2 unless my $reft = ref $target
532 0 2 unless $reft eq "CODE"
544 0 13 unless defined $package
545 5 8 if $package ne $internal_package
548 0 5 if $i > 4
549 1 4 if $caller_depth
555 0 1 unless eval { do { require Sys::Hostname; Sys::Hostname::hostname() } }
566 0 6 unless defined $package
567 3 3 if $package ne $internal_package
570 0 3 if $i > 4
571 1 2 if $caller_depth
574 0 3 unless defined $subroutine
585 0 13 unless defined $package
586 5 8 if $package ne $internal_package
589 0 5 if $i > 4
590 1 4 if $caller_depth
603 0 68 unless defined $package
604 16 52 if $package ne $internal_package
607 0 16 if $i > $max_i
608 1 15 if $caller_depth
610 0 16 unless defined $subroutine
622 0 3 if $m < 0
631 0 3 if $m < 0
642 0 6 unless defined $package
643 3 3 if $package ne $internal_package
646 0 3 if $level > 4
675 30 57 if $_[0]{'level'} == $DEAD or $$name > $_[0]{'level'}
696 0 107 unless ref $self
697 104 3 if @_