Branch Coverage

blib/lib/HTTP/Server/Simple.pm
Criterion Covered Total %
branch 11 88 12.5


line true false branch
140 3 8 if ($class eq 'HTTP::Server::Simple')
168 0 0 if $host_err
172 0 0 if $addr_err
188 9 7 if @_
207 8 6 if (@_)
208 8 0 if ($_[0] == 2 or $_[0] == 10) { }
229 6 2 if @_
244 0 7 unless defined $child
245 7 0 if $child
249 0 0 unless ($^O =~ /MSWin32/)
251 0 0 unless POSIX::setsid()
286 0 0 if ($server) { }
334 0 0 unless $self->host
335 0 0 if $self->can('accept_hook')
374 0 0 -x $0 ? :
385 0 0 unless $self->stdio_handle
399 0 0 $family == 10 ? :
0 0 $remote_sockaddr ? :
404 0 0 $family == 10 ? :
406 0 0 if ($iaddr)
408 0 0 if $host_err
415 0 0 unless ($self->valid_http_method($method))
425 0 0 defined $query_string ? :
439 0 0 if ($proto =~ m[HTTP/(\d(\.\d)?)$] and $1 >= 1)
442 0 0 unless (my $headers = $self->parse_headers)
448 0 0 if $self->can('post_setup_hook')
467 0 0 if @_
512 0 0 if (ref $self ne 'HTTP::Server::Simple') { }
546 0 0 if $self->can($item)
582 0 0 unless $can_header
648 0 0 if $buff eq "\n"
651 0 0 unless defined $chunk
680 0 0 if ($buff eq "\n") { }
682 0 0 if ($chunk =~ m(^([^()<>\@,;:\\"/\[\]?={} \t]+):\s*(.*))i)
685 0 0 if $chunk =~ /^$/
705 0 0 unless socket HTTPDaemon, $$self{'family'}, 1, $tcp
707 0 0 unless setsockopt HTTPDaemon, 1, 2, "\cA\000\000\000"
710 0 0 if ($self->host) { }
712 0 0 if $err
718 0 0 unless $$self{'family'} == $$a{'family'}
726 0 0 $$self{'family'} == 10 ? :
731 0 0 unless bind HTTPDaemon, $sockaddr
733 0 0 unless listen HTTPDaemon, 128
775 0 0 unless my $method = shift()