Branch Coverage

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


line true false branch
54 131 1 if (my $msg = "Dancer2::Core::HTTP"->status_message($self->status))
73 6 113 if $engine->pathname_exists($engine->view_pathname($self->status))
94 111 2 unless open my $fh, "<", $filename
106 105 10 $self->has_app && $self->app->has_request ? :
111 7 108 $show_fullmsg ? :
174 8 127 if $self->has_app and $self->app->has_serializer_engine
183 129 9 if $self->has_app
241 10 124 if ($self->serializer)
247 5 5 if $self->has_exception
255 6 118 if ($self->has_app and $self->template)
270 2 4 if $@
273 4 2 if defined $content
277 113 7 unless ($self->show_stacktrace and $self->status eq 500)
278 2 111 if (my $content = $self->static_page)
283 3 110 if ($self->has_app and $self->app->config->{'error_template'})
294 0 3 if $@
297 3 0 if defined $content
305 1 132 if @_
307 0 133 unless $self->response
310 128 5 if $self->has_app
319 128 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 166 unless defined $value