Branch Coverage

blib/lib/Plack/Handler/Gazelle.pm
Criterion Covered Total %
branch 30 80 37.5


line true false branch
30 0 69 if ($args{'listen_sock'}) { }
0 69 elsif (defined $ENV{'SERVER_STARTER_PORT'}) { }
36 0 0 if ($hostport =~ /(.*):(\d+)/) { }
42 0 0 unless $args{'listen_sock'} = "IO::Socket::INET"->new("Proto", "tcp")
45 0 0 unless $args{'listen_sock'}->fdopen($fd, "w")
52 5 133 if defined $args{$_}
55 2 67 if ($args{'child_exit'})
56 2 0 unless ref $args{'child_exit'}
57 0 2 if ref $args{'child_exit'} ne "CODE"
80 0 69 defined $args{'min_reqs_per_child'} ? :
0 69 defined $args{'err_respawn_interval'} ? :
92 0 69 unless $self->{'listen_sock'} ||= "IO::Socket::INET"->new("Listen", 4096, "LocalPort", $self->{'port'}, "LocalAddr", $self->{'host'}, "Proto", "tcp", "ReuseAddr", 1)
100 69 0 if ($^O eq "linux" and $self->{'_listen_sock_is_tcp'})
117 69 0 if (defined $self->{'spawn_interval'})
121 0 69 if (defined $self->{'err_respawn_interval'})
129 20 0 unless defined $ENV{'SERVER_STARTER_PORT'}
151 29 13528 if ($self->{'term_received'})
155 39 13489 if (my($conn, $buf, $env) = accept_psgi(fileno $self->{'listen_sock'}, $self->{'timeout'}, $self->{'_listen_sock_is_tcp'}, $self->{'host'} || 0, $self->{'port'} || 0))
167 0 39 if ($chunked) { }
1 38 elsif (my $cl = $env->{'CONTENT_LENGTH'}) { }
173 0 0 if (length $buf) { }
180 0 0 unless read_timeout($conn, \$chunk, 16384, 0, $self->{'timeout'})
187 0 0 if ($chunk_len == 0) { }
0 0 elsif (length $chunk_buffer < $chunk_len + 2) { }
204 1 0 if (length $buf) { }
210 0 0 unless read_timeout($conn, \$chunk, $cl, 0, $self->{'timeout'})
224 30 8 $env->{'SERVER_PROTOCOL'} eq 'HTTP/1.1' ? :
225 38 0 if (ref $res eq 'ARRAY') { }
0 0 elsif (ref $res eq 'CODE') { }
234 19 19 if ($env->{'psgix.harakiri.commit'})
250 0 49 if (defined $min) { }
263 38 0 if (defined $body and ref $body eq "ARRAY")
268 0 0 unless write_psgi_response_header($conn, $self->{'timeout'}, $status_code, $headers, scalar [], $use_chunked)
270 0 0 if (defined $body) { }
275 0 0 if $failed
277 0 0 if ($use_chunked) { }
283 0 0 if not defined $ret
286 0 0 if $use_chunked
290 0 0 if ($use_chunked) { }
298 0 0 if $use_chunked