Condition Coverage

blib/lib/Net/Server/HTTP.pm
Criterion Covered Total %
condition 37 112 33.0


and 3 conditions

line !l l&&!r l&&r condition
26 4 0 0 $ENV{'USE_XS_PARSER'} && eval { do { require HTTP::Parser::XS } }
90 0 1 1 !$log || $log eq '/dev/null' and not $prop->{'access_log_function'}
181 1 0 0 lc $key eq "status" and $line =~ /^(\d+) (?:|\s+(.+?))$/xi
200 0 0 0 ref $app eq "ARRAY" and not @$app
232 0 0 0 not $dispatch{'/'} and $first
295 0 2 0 not $body and $gen_body
304 2 0 0 $status == 204 || $status == 304 || $status >= 100 && $status <= 199 and not $self->{'server'}{'allow_body_on_all_statuses'}
324 2 0 0 defined $body and length $body
409 0 0 2 defined $req and $req =~ m[ ^\s*(GET|POST|PUT|PATCH|DELETE|PUSH|HEAD|OPTIONS)\s+(.+)\s+(HTTP/1\.[01])\s*$ ]xi
499 0 1 0 $ENV{'PATH_INFO'} and $ENV{'PATH_INFO'} eq "/simple"
567 8 1 0 $1 and $orig
9 0 0 $1 and $orig and $1 eq "<"
575 9 0 0 $2 && (substr($2, 0, 1) eq '!' ? index($2, $info->{'response_status'}) != -1 : index($2, $info->{'response_status'}) == -1)
578 1 0 8 defined $v and length $v

or 2 conditions

line l !l condition
140 0 0 $_[1] || 0
148 1 1 $request_info->{'response_size'} || 0
154 0 1 do { *$client }->{'headers'} ||= {"buffer", "", "status", undef, "msg", undef, "headers", []}
278 0 2 $version ||= "1.0"
293 2 0 $status ||= 500
294 2 0 $status_msg{$status} || '-'
373 0 0 "$@" || 'Something happened'
435 0 2 $self->script_name($ENV{'PATH_INFO'}) || ''
461 0 2 $ENV{'CONTENT_LENGTH'} || 0
526 2 0 $prop->{'access_log_format'} || (return)
527 1 1 $prop->{'access_log_function'} || (return)
575 1 0 $info->{'response_size'} || '-'
586 0 1 $fmt || '%d/%b/%Y:%T %z'
634 0 0 "$@" || "Error while running trusted perl script\n"
653 0 0 $? >> 8 || -1
666 0 0 $ENV{'CONTENT_LENGTH'} || 0
677 0 0 $printed ||= 1

or 3 conditions

line l !l&&r !l&&!r condition
90 2 0 0 !$log || $log eq '/dev/null'
93 0 0 0 $log eq "STDOUT" or $log eq "/dev/stdout"
0 0 0 $log eq "STDERR" or $log eq "/dev/stderr"
164 0 1 0 $headers->{'status'} or @{$headers->{'headers'};}
200 1 0 0 not $app or ref $app eq "ARRAY" and not @$app
227 0 0 0 $first ||= $key
294 0 2 0 $msg ||= $status_msg{$status} || '-'
304 0 0 2 $status == 204 || $status == 304 || $status >= 100 && $status <= 199
356 1 0 0 shift() || $self->{'server'}{'client'}
388 1 1 0 shift() || $self->{'server'}{'client'}
452 0 2 0 $prop->{'peerhost'} || $info->{'peeraddr'}
614 0 0 0 $self->http_log_header_in($info, 'Host') || $self->{'server'}{'client'}->NS_host || $self->{'server'}{'sockaddr'}