Branch Coverage

blib/lib/AWS/Lambda/PSGI.pm
Criterion Covered Total %
branch 45 68 66.1


line true false branch
23 0 2 if (@_ == 1 and ref $_[0] eq 'HASH') { }
29 2 0 unless (defined $self->{'invoke_mode'})
42 0 0 if scalar @_ == 1
43 0 0 scalar @_ == 2 ? :
59 0 0 if (ref $self) { }
74 0 0 if ($self->{'invoke_mode'} eq 'RESPONSE_STREAM') { }
88 14 0 if (my $context = $payload->{'requestContext'})
89 3 11 if ($context->{'elb'})
94 6 5 if (my $version = $payload->{'version'})
95 0 6 if ($version =~ /^1[.]/u)
99 6 0 if ($version =~ /^2[.]/u)
118 4 0 if (ref $value eq 'ARRAY') { }
136 60 6 unless ($key =~ /^(?:CONTENT_LENGTH|CONTENT_TYPE)$/u)
139 48 18 if (ref $value eq "ARRAY")
156 1 7 if ($ctx)
162 3 5 if ($payload->{'isBase64Encoded'})
170 4 4 if ($env->{'QUERY_STRING'})
177 8 0 if ($requestContext)
180 5 0 if ($stage and $path and $path ne $payload->{'path'})
198 46 7 unless ($key =~ /^(?:CONTENT_LENGTH|CONTENT_TYPE)$/u)
215 0 6 if ($ctx)
221 2 4 if ($payload->{'isBase64Encoded'})
230 2 4 if ($env->{'QUERY_STRING'})
251 3 1 if (builtin::reftype($body) eq 'ARRAY') { }
263 1 3 if ($isBase64Encoded) { }
287 2 1 if (builtin::reftype($response) ne "CODE")
305 0 3 unless $writer->write($prelude)
308 1 2 unless (defined $body)
312 1 1 if (builtin::reftype($body) eq 'ARRAY') { }
315 0 1 unless $writer->write($chunk)
321 0 1 unless $writer->write($chunk)
324 0 2 unless $writer->close
339 0 3 if ($k eq 'set-cookie') { }
0 3 elsif (exists $headers_hash->{$k}) { }