Branch Coverage

blib/lib/Devel/Confess.pm
Criterion Covered Total %
branch 98 156 62.8


line true false branch
6 0 9 if (not defined &DB::DB and $^P & 2)
11 9 0 $can_use_informative_names ? :
30 0 9 $] >= 5.008009 && $] < 5.01 ? :
32 0 9 $] > 5.008009 && $] <= 5.01 ? :
34 0 9 $] < 5.008008 ? :
40 9 0 defined &Config::non_bincompat_options ? :
0 9 (defined &Config::non_bincompat_options ? grep(($_ eq 'DEBUGGING'), Config::non_bincompat_options()) : $Config::Config{'ccflags'} =~ /-DDEBUGGING\b/) ? :
87 52 1 defined $arg ? :
88 47 6 if (@match) { }
101 13 5 defined $ENABLEOPTS{$opt} ? :
2 18 @_ && (!defined($_[0]) || $_[0] =~ /^\d+$/) ? :
4 20 defined $num ? :
2 24 defined $equal ? :
21 26 defined $no ? :
104 16 31 if ($NUMOPTS{$opt})
105 2 14 !$value ? :
0 16 !defined($value) ? :
116 5 48 if (@bad)
118 5 1 defined $_ ? :
140 0 34 if (defined $OPTIONS{'builtin'})
142 0 0 $OPTIONS{'builtin'} ? :
145 10 24 if ($OPTIONS{'source'} or $OPTIONS{'evalsource'})
149 0 34 if ($OPTIONS{'color'} and $^O eq 'MSWin32')
150 0 0 if (eval { do { require Win32::Console::ANSI } }) { }
161 34 0 if ($OPTIONS{'errors'} and not $OLD_SIG{'__DIE__'})
163 5 29 if $SIG{'__DIE__'} and $SIG{'__DIE__'} ne \&Devel::Confess::_die
166 16 18 if ($OPTIONS{'warnings'} and not $OLD_SIG{'__WARN__'})
168 0 16 if $SIG{'__WARN__'} and $SIG{'__WARN__'} ne \&Devel::Confess::_warn
174 34 0 if $OPTIONS{'better_names'}
183 18 36 unless my $now = $SIG{$name}
185 0 36 if ($now ne $sub and $old) { }
5 31 elsif ($old) { }
206 56 5 unless defined $sig
207 1 4 if ref $sig
210 2 2 if $sig eq 'DEFAULT' or $sig eq 'IGNORE'
215 2 0 defined &{$sig;} ? :
221 0 0 if (my $sig = _find_sig($OLD_SIG{'__WARN__'})) { }
222 0 0 ref $convert[0] ? :
226 0 0 if $OPTIONS{'color'}
233 3 58 if (my $sig = _find_sig($OLD_SIG{'__DIE__'}))
234 0 3 ref $convert[0] ? :
236 0 61 if &_can_stringify()
237 0 61 if $OPTIONS{'color'} and &_can_stringify()
244 58 3 unless ref $convert[0]
249 0 0 if ($OPTIONS{'color'} eq 'force' or -t *STDERR)
250 0 0 if (@convert == 1)
268 0 15 $OPTIONS{'dump'} eq 'inf' ? :
275 7 58 $OPTIONS{'dump'} ? :
278 21 40 if ($OPTIONS{'source'} or $OPTIONS{'evalsource'})
280 0 21 $OPTIONS{'evalsource'} ? :
297 1 0 defined $ex ? :
312 0 0 if defined $EXCEPTIONS{$id}
323 3 62 if (my $class = &blessed(my $ex = $_[0])) { }
0 62 elsif (ref($ex = $_[0])) { }
325 0 3 unless $OPTIONS{'objects'}
327 0 3 unless do { no strict 'refs'; defined &{'Devel::Confess::_Attached::DESTROY';} }
330 0 3 if (defined $EXCEPTIONS{$id})
332 0 0 if $ex->isa('Devel::Confess::_Attached')
336 0 0 if (ref($ex) =~ /^Devel::Confess::__ANON_/) { }
348 0 3 if (grep {$ex->$does($_) unless $NoTrace{$_} and _can($ex, 'isa') and $ex->isa($_);} keys %NoTrace)
350 6 0 unless $NoTrace{$_} and _can($ex, 'isa') and $ex->isa($_)
389 24 38 if (caller 1 eq 'Carp')
393 12 12 unless $out =~ s/\Q$long\E\z|\Q$long_trail\E\z//
400 21 41 if $OPTIONS{'source'} or $OPTIONS{'evalsource'}
407 21 37 if $OPTIONS{'source'} or $OPTIONS{'evalsource'}
410 58 0 length $trace ? :
411 46 12 if $out =~ s/(\Q$find\E(?: during global destruction)?(\.?\n?))$trace_re\z//
413 9 49 if (defined $source_trace)
414 9 0 if (defined $new_source_trace)
420 21 37 if (defined $new_source_trace)
429 0 1 unless ref $ex
434 1 0 if (&blessed($ex)) { }
0 0 elsif ($OPTIONS{'dump'}) { }
436 1 0 if $class
437 0 1 if ($OPTIONS{'dump'} and not overload::OverloadedStringify($ex)) { }
443 1 0 if $class
485 0 2 unless my $class = delete $Devel::Confess::PACKAGES{$id}
504 0 2 if (delete $Devel::Confess::CLONED{$id})