Branch Coverage

blib/lib/Log/Report.pm
Criterion Covered Total %
branch 86 176 48.8


line true false branch
61 3 30 ref $_[0] eq 'HASH' ? :
63 1 32 exists $opts->{'is_fatal'} ? :
66 6 27 if (defined(my $try = $nested_tries[-1])) { }
67 0 1 unless $reporter->{'needs'}{$reason}
1 5 unless $stop or $try->hides($reason)
69 6 0 if $try->needs($reason)
72 18 9 unless $reporter->{'needs'}{$reason}
75 0 33 unless &is_reason($reason)
79 18 15 unless @disp or $stop
83 2 13 if &use_errno($reason) and not defined $opts->{'errno'}
85 0 15 if (my $to = delete $opts->{'to'})
87 0 0 if (ref $to eq 'ARRAY') { }
94 0 0 unless @disp or $stop
100 0 15 unless ('Log::Report::Dispatcher'->can('collectLocation'))
107 12 3 if (not &blessed($message)) { }
3 0 elsif ($message->isa('Log::Report::Exception')) { }
0 0 elsif ($message->isa('Log::Report::Message')) { }
109 0 12 if @_ % 2
117 0 0 unless @_ == 0
120 0 15 if (my $to = $message->to)
122 0 0 unless @disp
126 1 14 if (my $filters = $reporter->{'filters'}) { }
132 1 1 if keys %{$$filter[1];} and not $filter->[1]{$d->name}
134 0 1 unless $r
143 6 9 if ($stop)
145 6 0 defined $^S ? :
0 6 unless defined $^S ? $^S : 1
164 18 13 unless ($disp_actions{$_[0]})
170 13 5 unless ($reopen_disp)
172 0 13 if (defined $has and $has ne $default_dispatcher)
173 0 0 $name eq 'default' ? :
181 0 18 if @disps != @$disps
186 18 0 if $disp
190 18 0 $disp ? :
194 7 6 if ($command eq 'list')
195 0 7 if @_
198 1 6 if @nested_tries
201 0 6 if ($command eq 'needs')
203 0 0 unless &is_reason($reason)
206 0 0 $disp ? :
208 2 4 if ($command eq 'filter')
210 0 2 unless ref $code eq 'CODE'
216 0 4 if ($command eq 'active-try')
219 0 4 if ($command eq 'do-not-reopen')
224 0 4 $command eq 'mode' ? :
229 0 4 if ($all_disp) { }
236 0 0 if @disps > 1 and not wantarray and defined wantarray
239 4 0 if ($command eq 'close') { }
0 0 elsif ($command eq 'enable') { }
0 0 elsif ($command eq 'disable') { }
0 0 elsif ($command eq 'mode') { }
247 0 0 if $all_disp
252 4 0 if $command ne 'find'
254 0 4 wantarray ? :
276 0 15 if @_ % 2
281 11 4 if $reporter->{'needs'}{'TRACE'}
290 9 6 if (not defined wantarray) { }
1 5 elsif (wantarray) { }
298 6 4 if (not $is_exception and $err and not $disp->wasFatal)
304 5 10 $is_exception ? :
11 4 if $is_exception ? $err->isFatal : $err
309 1 14 wantarray ? :
341 0 50 unless @_ % 2
431 0 110 if ($INC{'Log/Report/Minimal.pm'})
433 0 0 if (index($pkg, 'Log::Report::') != 0)
436 0 0 if @pkgs
442 104 6 @_ % 2 ? :
448 98 12 if (defined $textdomain)
455 0 110 if (exists $opts{'mode'})
462 0 110 if (my $in = delete $opts{'import'}) { }
463 0 0 ref $in eq 'ARRAY' ? :
469 110 0 if ($syntax eq 'SHORT') { }
0 0 elsif ($syntax ne 'REPORT' and $syntax ne 'LONG') { }
478 0 110 if (my $msg_class = delete $opts{'message_class'})
479 0 0 unless $msg_class->isa($lrm)
489 110 0 if (not %opts) { }
0 0 elsif ($domain) { }
503 0 0 unless my $domain = &textdomain($name)
507 0 0 unless @_
510 0 0 unless defined $pkg
513 0 0 unless $translator->isa('Log::Report::Translator')
522 0 208 if (@_ == 1 and &blessed($_[0]))
524 0 0 unless $domain->isa('Log::Report::Domain')
528 0 208 if (@_ == 2)
530 0 0 if $_[1] eq 'DELETE'
531 0 0 if $_[1] eq 'EXISTS'
538 0 208 if @_
546 0 0 ref $thing ? :