Branch Coverage

blib/lib/Dancer2/Core/Error.pm
Criterion Covered Total %
branch 62 72 86.1


line true false branch
54 125 1 if (my $msg = "Dancer2::Core::HTTP"->status_message($self->status))
73 6 107 if $engine->pathname_exists($engine->view_pathname($self->status))
94 105 2 unless open my $fh, "<", $filename
106 99 10 $self->has_app && $self->app->has_request ? :
111 7 102 $show_fullmsg ? :
174 8 121 if $self->has_app and $self->app->has_serializer_engine
183 123 9 if $self->has_app
241 10 118 if ($self->serializer)
247 5 5 if $self->has_exception
255 6 112 if ($self->has_app and $self->template)
270 2 4 if $@
273 4 2 if defined $content
277 107 7 unless ($self->show_errors and $self->status eq 500)
278 2 105 if (my $content = $self->static_page)
283 3 104 if ($self->has_app and $self->app->config->{'error_template'})
294 0 3 if $@
297 3 0 if defined $content
305 1 126 if @_
307 0 127 unless $self->response
310 122 5 if $self->has_app
319 122 5 if $self->has_app
330 7 0 if ($self->exception)
331 0 7 if $message
341 3 4 unless $file and $line
344 3 4 unless $file and $line
347 0 4 unless my $fh = eval {
354 4 0 $line - 5 > 1 ? :
355 4 0 $line + 5 < @lines ? :
361 4 40 $l == $line ? :
386 1 6 if ($censored)
402 7 14 $_ ? :
433 0 61 unless ($hash and XXX)
440 58 258 if (XXX) { }
2 256 elsif ($key =~ /(pass|card?num|pan|secret)/i) { }
441 54 4 unless ($$visited{$hash->{$key}})
461 0 160 unless defined $value