Branch Coverage

blib/lib/Limper.pm
Criterion Covered Total %
branch 0 96 0.0


line true false branch
30 0 0 $_[0] ? :
85 0 0 @_ ? :
106 0 0 $@ ? :
121 0 0 unless defined(my $line = timeout(sub { $conn->getline; } ))
122 0 0 if (not defined $request_line) { }
0 0 elsif (not defined $headers_done) { }
123 0 0 if $line eq "\r\n"
125 0 0 unless defined $request->{'method'}
130 0 0 if ($line =~ /^\r\n/) { }
134 0 0 if ($name =~ /\r\n/)
138 0 0 if lc $name eq 'host' and $request->{'version'} eq 'HTTP/1.1' and $request->{'uri'} =~ s[^https?://(.+?)/][/]
139 0 0 if (exists $request->{'headers'}{lc $name}) { }
140 0 0 if (ref $request->{'headers'}{lc $name}) { }
150 0 0 if (defined $headers_done)
151 0 0 if defined $chunked
153 0 0 if $request->{'version'} eq 'HTTP/1.1' and !exists $request->{'headers'}{'host'} || ref $request->{'headers'}{'host'}
155 0 0 if ($_ eq 'expect' and lc $request->{'headers'}{$_} eq '100-continue' and $request->{'version'} eq 'HTTP/1.1') { }
0 0 elsif ($_ eq 'content-length') { }
0 0 elsif ($_ eq 'transfer-encoding' and lc $request->{'headers'}{$_} eq 'chunked') { }
165 0 0 if $length
172 0 0 if defined $headers_done
180 0 0 defined $request->{'method'} && $request->{'method'} eq 'HEAD' ? :
181 0 0 if (defined $request->{'method'} and exists $$route{$request->{'method'}})
183 0 0 if ($$route{$request->{'method'}}[$i] eq $request->{'path'} || ref $$route{$request->{'method'}}[$i] eq 'Regexp' and $request->{'path'} =~ /$$route{$request->{'method'}}[$i]/)
200 0 0 lc($request->{'headers'}{'connection'} // 'close') eq 'keep-alive' ? :
0 0 ($request->{'version'} // '') eq 'HTTP/1.1' ? :
203 0 0 if (defined $response->{'body'} and not ref $response->{'body'})
207 0 0 if $head // 0
208 0 0 if $connection eq 'close' or $connection eq 'keep-alive' and $request->{'version'} ne 'HTTP/1.1'
211 0 0 if exists $hook->{'response_handler'}
215 0 0 unless $conn->connected
220 0 0 if defined $response->{'body'}
221 0 0 if $connection eq 'close'
225 0 0 if (defined wantarray) { }
226 0 0 wantarray ? :
229 0 0 if @_
234 0 0 if (not defined wantarray) { }
239 0 0 if (ref $response->{'headers'}{$key}) { }
258 0 0 if ref $_[0] eq 'HASH'
259 0 0 if exists $hook->{'request_handler'}
260 0 0 unless my $sock = 'IO::Socket::INET'->new('Listen', 128, 'ReuseAddr', 1, 'LocalAddr', 'localhost', 'LocalPort', 8080, 'Proto', 'tcp', @_)
266 0 0 unless defined(my $pid = fork)
268 0 0 if ($conn = $sock->accept)
272 0 0 if $conn->connected
274 0 0 if ($@)
275 0 0 $config->{'debug'} // 0 ? :
287 0 0 $shutdown ? :
288 0 0 $closed ? :