Branch Coverage

blib/lib/Error.pm
Criterion Covered Total %
branch 59 108 54.6


line true false branch
51 14 12 if ($_ eq ':warndie') { }
72 1 0 unless @_
75 0 0 exists $ERROR{$pkg} ? :
0 0 unless ref $pkg
80 0 0 if ($obj->isa('HASH')) { }
0 0 elsif ($obj->isa('GLOB')) { }
83 0 0 if exists $obj->{'__Error__'}
88 0 0 if exists do { *$obj }->{'__Error__'}
98 0 0 unless (@_)
105 0 0 unless ref $pkg
107 0 0 if defined $ERROR{$pkg}
119 1 0 if exists $self->{'-stacktrace'}
121 0 0 exists $self->{'-text'} ? :
123 0 0 unless $text =~ /\n$/s
134 0 0 unless ref $obj
136 0 0 if ($obj->isa('HASH')) { }
0 0 elsif ($obj->isa('GLOB')) { }
163 0 25 if exists $err->{'-object'}
168 1 24 if ($Error::Debug)
172 1 0 defined $err->{'-text'} ? :
194 12 11 unless ref $self
244 0 0 exists $self->{'-object'} ? :
250 11 0 exists $self->{'-file'} ? :
256 11 0 exists $self->{'-line'} ? :
262 1 0 exists $self->{'-text'} ? :
270 12 0 defined $self->{'-text'} ? :
276 3 0 exists $self->{'-value'} ? :
292 12 10 if $text =~ s/\s+at\s+(\S+)\s+line\s+(\d+)(?:,\s*<[^>]*>\s+line\s+\d+)?\.?\n?$//s
295 1 21 if defined $value
305 10 2 unless $text =~ /\n$/s
331 9 14 unless ref $err
338 14 9 if (defined($catch = $clauses->{'catch'}))
346 15 1 defined $pkg ? :
397 8 5 if (defined($owise = $clauses->{'otherwise'}))
404 0 8 if ($wantarray) { }
0 8 elsif (defined $wantarray) { }
419 6 2 if ($ok) { }
427 2 0 unless ref $err
438 24 1 @_ ? :
453 0 25 if ($wantarray) { }
3 22 elsif (defined $wantarray) { }
468 23 2 unless $ok
474 23 2 unless $ok
478 3 22 if defined $clauses->{'finally'}
480 12 13 if (defined $err)
482 11 1 if (builtin::blessed($err) and $err->can('throw')) { }
492 0 13 if (wantarray) { }
533 1 0 if (@array == 1 and ref $array[0]) { }
536 1 0 if UNIVERSAL::isa($ref, "HASH")
556 0 10 if (exists $clauses->{'otherwise'})
597 0 4 if $^S
600 1 3 if (ref $e and $e->isa('Error')) { }
610 0 3 if $e =~ /^\nUnhandled perl error caught at toplevel:\n\n/
623 2 1 if ($message =~ s/ at (.*?) line (\d+)\.$//) { }