Branch Coverage

blib/lib/Plack/Middleware/PrettyException.pm
Criterion Covered Total %
branch 33 40 82.5


line true false branch
30 10 7 unless (eval { do { $r = $self->app->($env); 1 } })
33 8 2 if (&blessed($e)) { }
35 8 0 if ($e->can('message')) { }
41 7 0 $e->can('http_status') ? :
1 7 $e->can('status_code') ? :
47 1 7 if ($r->[0] =~ /^3/ and $e->can("location"))
49 1 0 unless $r->[2]
64 2 5 unless ($died or &is_error($r->[0]))
69 1 14 if ($r->[0] =~ /^3/)
77 7 7 unless ($error)
79 5 2 ref $body eq 'ARRAY' ? :
91 2 12 if ($orig_headers->content_type =~ m[application/json]i)
96 4 8 if ($self->force_json or exists $env->{'HTTP_ACCEPT'} and $env->{'HTTP_ACCEPT'} =~ m[application/json]i) { }
102 0 4 if ($exception and $exception->can("does"))
103 0 0 if ($exception->does("Throwable::X"))
135 3 5 if ($exception and $exception->can("does"))
137 2 1 if ($exception->does("Throwable::X"))
142 1 1 if (ref $v) { }
143 1 0 if (ref $v eq 'ARRAY') { }
159 2 1 if (@more)