Branch Coverage

blib/lib/Plack/Middleware/DebugLogging.pm
Criterion Covered Total %
branch 50 96 52.0


line true false branch
26 2 0 unless defined $self->debug
27 2 0 unless defined $self->request
28 2 0 unless defined $self->response
29 2 0 unless defined $self->keywords
30 2 0 unless defined $self->request_headers
31 2 0 unless defined $self->request_parameters
32 2 0 unless defined $self->response_headers
33 2 0 unless defined $self->response_status_line
34 2 0 unless defined $self->uploads
35 2 0 unless defined $self->body_params
36 2 0 unless defined $self->query_params
37 2 0 unless defined $self->attempt_deserialize
39 2 0 if ($self->attempt_deserialize)
43 2 0 if defined $self->logger
52 0 4 unless ($self->logger_override)
53 0 0 if ($request->logger) { }
64 4 0 if $self->request
68 4 0 if $self->response
76 21 0 if (my $logger = $self->logger) { }
88 0 4 unless $self->debug
92 0 4 unless length $path
96 4 0 if $self->request_headers
99 3 1 if (index($request->env->{'QUERY_STRING'}, '=') < 0)
101 1 2 if $keywords and $self->keywords
105 4 0 if ($self->request_parameters)
106 4 0 if $self->query_params
109 2 2 if $request->content and $self->body_params
112 1 3 if $request->content and not +($request->content_type || '') =~ /www-form-urlencoded/
116 4 0 if $self->uploads
124 0 4 unless $self->debug
126 4 0 if $self->response_status_line
127 4 0 if $self->response_headers
163 0 7 unless $self->debug
168 11 3 unless keys %$params
172 4 1 length $param[0] ? :
173 1 4 ref $value eq 'ARRAY' ? :
178 1 6 if (my $request = $all_params{'encoded'})
179 1 0 if (my $module = $$module_map{$request->content_type}) { }
199 0 4 unless $self->debug
202 0 4 if (keys %$uploads)
211 0 0 ref $upload eq 'ARRAY' ? :
223 0 8 unless $self->debug
243 0 0 if (defined(my $value = $ENV{"${prefix}_$key"}))
254 15 0 if $self->term_width
261 0 0 if ($@)
262 0 0 if exists $ENV{'COLUMNS'} and $ENV{'COLUMNS'} =~ /^\d+$/
267 0 0 unless $width and $width >= 80
274 0 1 defined $1 ? :