Branch Coverage

blib/lib/Plack/Handler/Gazelle.pm
Criterion Covered Total %
branch 54 80 67.5


line true false branch
30 0 204 if ($args{'listen_sock'}) { }
0 204 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 403 if defined $args{$_}
55 2 202 if ($args{'child_exit'})
56 2 0 unless ref $args{'child_exit'}
57 0 2 if ref $args{'child_exit'} ne 'CODE'
80 0 204 defined $args{'min_reqs_per_child'} ? :
0 204 defined $args{'err_respawn_interval'} ? :
92 0 204 unless $self->{'listen_sock'} ||= 'IO::Socket::INET'->new('Listen', 128, 'LocalPort', $self->{'port'}, 'LocalAddr', $self->{'host'}, 'Proto', 'tcp', 'ReuseAddr', 1)
100 204 0 if ($^O eq 'linux' and $self->{'_listen_sock_is_tcp'})
117 204 0 if (defined $self->{'spawn_interval'})
121 0 204 if (defined $self->{'err_respawn_interval'})
129 19 0 unless defined $ENV{'SERVER_STARTER_PORT'}
151 161 458 if ($self->{'term_received'})
155 147 311 if (my($conn, $buf, $env) = accept_psgi(fileno $self->{'listen_sock'}, $self->{'timeout'}, $self->{'_listen_sock_is_tcp'}, $self->{'host'} || 0, $self->{'port'} || 0))
164 9 138 if (my $cl = $env->{'CONTENT_LENGTH'}) { }
1 137 elsif ($chunked) { }
168 1 28 if (length $buf) { }
174 0 28 unless read_timeout($conn, \$chunk, $cl, 0, $self->{'timeout'})
186 0 10 if (length $buf) { }
193 0 10 unless read_timeout($conn, \$chunk, 16384, 0, $self->{'timeout'})
200 1 15 if ($chunk_len == 0) { }
0 15 elsif (length $chunk_buffer < $chunk_len + 2) { }
221 94 52 $env->{'SERVER_PROTOCOL'} eq 'HTTP/1.1' ? :
222 134 12 if (ref $res eq 'ARRAY') { }
12 0 elsif (ref $res eq 'CODE') { }
231 23 123 if ($env->{'psgix.harakiri.commit'})
247 0 185 if (defined $min) { }
260 130 16 if (defined $body and ref $body eq 'ARRAY')
265 0 16 unless write_psgi_response_header($conn, $self->{'timeout'}, $status_code, $headers, [], $use_chunked)
267 10 6 if (defined $body) { }
272 0 16 if $failed
274 5 11 if ($use_chunked) { }
280 0 16 if not defined $ret
283 2 8 if $use_chunked
287 7 7 if ($use_chunked) { }
295 3 3 if $use_chunked