Branch Coverage

blib/lib/Log/Log4perl/Tiny.pm
Criterion Covered Total %
branch 164 230 71.3


line true false branch
19 0 33 if (grep {$_ eq ":full_or_fake";} @list)
22 0 0 if eval "\n package $caller;\n $sue;\n 1;\n "
33 10 310 if $done{$item}
35 234 76 if ($item =~ /^[a-zA-Z]/msx) { }
26 50 elsif ($item eq ':levels') { }
15 35 elsif ($item eq ':subs') { }
15 20 elsif ($item =~ /\A : (mimic | mask | fake) \z/msx) { }
14 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 13 2 unless ("Log::Log4perl"->can("easy_init"))
58 9 3 if (ref $conf) { }
2 1 elsif (defined $conf) { }
61 9 0 if exists $conf->{'level'}
63 8 1 if exists $conf->{'format'}
65 0 9 if exists $conf->{'layout'}
67 1 8 if exists $conf->{'filter'}
87 28 5 unless ($level_set)
98 9 30 ref $_[0] ? :
100 0 39 if exists $args{'layout'}
103 1 38 if (exists $args{'channels'}) { }
108 179 4 unless exists $args{$key}
114 38 1 if @$channels == 1
122 136 20 unless defined $args{$accessor}
126 31 8 unless exists $self->{'format'}
128 1 38 if (exists $args{'loglocal'})
137 39 0 @_ && ref $_[0] ? :
143 0 42 unless defined $key
145 0 42 unless defined $value
150 38 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) { }
154 0 2 unless open $channel, ">>", $value
159 0 2 unless open $channel, ">", $value
164 0 0 unless open $channel, $value
173 4 38 if ($set_autoflush)
190 7 0 if exists $id_for{$level}
196 7 0 if exists $name_of{$id}
197 0 0 if exists $id_for{$id}
205 9 2 if @_
212 3 1 if @_
220 95 0 if (@_)
224 7 211 if (defined $_[2])
229 207 4 if (defined $_[4])
236 3 1 !defined($_[5]) || $_[5] eq '%' ? :
244 190 1425 if $type
245 1520 95 if $type ne "required"
250 190 0 length $_ ? :
278 1 110 ref $fh eq 'ARRAY' ? :
281 20 94 ref $channel eq 'CODE' ? :
288 2 134 if $self->{'level'} == $DEAD
291 23 111 if $level > $self->{'level'}
296 3 108 exists $self->{'loglocal'} ? :
301 2 109 if $self->{'filter'}
310 0 0 if defined $self->{'logexit_code'}
311 0 0 if defined $Log::Log4perl::LOGEXIT_CODE
320 4 0 if $self->is_warn or $LOGDIE_MESSAGE_ON_STDERR
325 4 0 if ($LOGDIE_MESSAGE_ON_STDERR)
327 0 4 unless @message
331 4 0 if substr($message[-1], -1, 1) ne "\n"
345 1 0 if $self->is_fatal or $LOGDIE_MESSAGE_ON_STDERR
350 1 0 if ($LOGDIE_MESSAGE_ON_STDERR)
352 0 1 unless @message
356 1 0 if substr($message[-1], -1, 1) ne "\n"
385 10 0 if $emit_log or $LOGDIE_MESSAGE_ON_STDERR
388 10 0 if ($emit_log)
393 8 2 if ($LOGDIE_MESSAGE_ON_STDERR)
424 0 130 unless ref $self
425 91 39 if (@_)
427 0 91 unless exists $id_for{$level}
436 28 5 unless ($self->{'_count'})
446 0 84 defined $, ? :
8 83 ref $_ eq 'CODE' ? :
470 0 27 unless ($strftime_has_tz_offset)
492 0 13 unless defined $package
493 5 8 if $package ne $internal_package
496 0 5 if $i > $max_i
497 1 4 if $caller_depth
510 2 4 unless defined $options
516 2 4 if $flag_for{'utc'}
519 4 0 if $strftime_has_tz_offset
524 0 0 if $offset < 0
537 0 3 unless my $local = $data->{'loglocal'}
539 0 3 unless exists $local->{$key}
541 0 3 unless defined $target
542 1 2 unless my $reft = ref $target
543 0 2 unless $reft eq "CODE"
555 0 13 unless defined $package
556 5 8 if $package ne $internal_package
559 0 5 if $i > 4
560 1 4 if $caller_depth
566 0 1 unless eval { do { require Sys::Hostname; Sys::Hostname::hostname() } }
577 0 6 unless defined $package
578 3 3 if $package ne $internal_package
581 0 3 if $i > 4
582 1 2 if $caller_depth
585 0 3 unless defined $subroutine
596 0 13 unless defined $package
597 5 8 if $package ne $internal_package
600 0 5 if $i > 4
601 1 4 if $caller_depth
614 0 68 unless defined $package
615 16 52 if $package ne $internal_package
618 0 16 if $i > $max_i
619 1 15 if $caller_depth
621 0 16 unless defined $subroutine
633 0 3 if $m < 0
642 0 3 if $m < 0
653 0 6 unless defined $package
654 3 3 if $package ne $internal_package
657 0 3 if $level > 4
686 30 57 if $_[0]{'level'} == $DEAD or $$name > $_[0]{'level'}
707 0 110 unless ref $self
708 107 3 if @_