Branch Coverage

blib/lib/Log/Report.pm
Criterion Covered Total %
branch 91 180 50.5


line true false branch
61 3 33 ref $_[0] eq 'HASH' ? :
63 1 35 exists $opts->{'is_fatal'} ? :
66 7 29 if (defined(my $try = $nested_tries[-1])) { }
67 0 1 unless $reporter->{'needs'}{$reason}
1 6 unless $stop or $try->hides($reason)
69 7 0 if $try->needs($reason)
72 20 9 unless $reporter->{'needs'}{$reason}
75 0 36 unless &is_reason($reason)
79 20 16 unless @disp or $stop
83 2 14 if &use_errno($reason) and not defined $opts->{'errno'}
85 0 16 if (my $to = delete $opts->{'to'})
87 0 0 if (ref $to eq 'ARRAY') { }
94 0 0 unless @disp or $stop
100 0 16 unless ('Log::Report::Dispatcher'->can('collectLocation'))
107 12 4 if (not &blessed($message)) { }
3 1 elsif ($message->isa('Log::Report::Exception')) { }
0 1 elsif ($message->isa('Log::Report::Message')) { }
109 0 12 if @_ % 2
117 0 0 unless @_ == 0
123 0 1 if @_ % 2
128 0 16 if (my $to = $message->to)
130 0 0 unless @disp
134 1 15 if (my $filters = $reporter->{'filters'}) { }
140 1 1 if keys %{$$filter[1];} and not $filter->[1]{$d->name}
142 0 1 unless $r
151 7 9 if ($stop)
153 7 0 defined $^S ? :
0 7 unless defined $^S ? $^S : 1
172 20 13 unless ($disp_actions{$_[0]})
178 15 5 unless ($reopen_disp)
180 0 15 if (defined $has and $has ne $default_dispatcher)
181 0 0 $name eq 'default' ? :
189 0 20 if @disps != @$disps
194 20 0 if $disp
198 20 0 $disp ? :
202 7 6 if ($command eq 'list')
203 0 7 if @_
206 1 6 if @nested_tries
209 0 6 if ($command eq 'needs')
211 0 0 unless &is_reason($reason)
214 0 0 $disp ? :
216 2 4 if ($command eq 'filter')
218 0 2 unless ref $code eq 'CODE'
224 0 4 if ($command eq 'active-try')
227 0 4 if ($command eq 'do-not-reopen')
232 0 4 $command eq 'mode' ? :
237 0 4 if ($all_disp) { }
244 0 0 if @disps > 1 and not wantarray and defined wantarray
247 4 0 if ($command eq 'close') { }
0 0 elsif ($command eq 'enable') { }
0 0 elsif ($command eq 'disable') { }
0 0 elsif ($command eq 'mode') { }
255 0 0 if $all_disp
260 4 0 if $command ne 'find'
262 0 4 wantarray ? :
284 0 17 if @_ % 2
289 11 6 if $reporter->{'needs'}{'TRACE'}
298 11 6 if (not defined wantarray) { }
1 5 elsif (wantarray) { }
306 7 4 if (not $is_exception and $err and not $disp->wasFatal)
308 1 6 &blessed($err) ? :
315 6 11 $is_exception ? :
13 4 if $is_exception ? $err->isFatal : $err
320 1 16 wantarray ? :
353 0 52 unless @_ % 2
443 0 126 if ($INC{'Log/Report/Minimal.pm'})
445 0 0 if (index($pkg, 'Log::Report::') != 0)
448 0 0 if @pkgs
454 118 8 @_ % 2 ? :
460 112 14 if (defined $textdomain)
467 0 126 if (exists $opts{'mode'})
474 0 126 if (my $in = delete $opts{'import'}) { }
475 0 0 ref $in eq 'ARRAY' ? :
481 126 0 if ($syntax eq 'SHORT') { }
0 0 elsif ($syntax ne 'REPORT' and $syntax ne 'LONG') { }
490 0 126 if (my $msg_class = delete $opts{'message_class'})
491 0 0 unless $msg_class->isa($lrm)
501 126 0 if (not %opts) { }
0 0 elsif ($domain) { }
515 0 0 unless my $domain = &textdomain($name)
519 0 0 unless @_
522 0 0 unless defined $pkg
525 0 0 unless $translator->isa('Log::Report::Translator')
534 0 226 if (@_ == 1 and &blessed($_[0]))
536 0 0 unless $domain->isa('Log::Report::Domain')
540 0 226 if (@_ == 2)
542 0 0 if $_[1] eq 'DELETE'
543 0 0 if $_[1] eq 'EXISTS'
550 0 226 if @_
558 0 0 ref $thing ? :