Condition Coverage

blib/lib/Net/Server/HTTP.pm
Criterion Covered Total %
condition 22 94 23.4


and 3 conditions

line !l l&&!r l&&r condition
26 4 0 0 $ENV{'USE_XS_PARSER'} && eval { do { require HTTP::Parser::XS } }
151 1 1 0 not $headers->{'parsed'} and $line =~ m[^HTTP/(1.[01]) \s+ (\d+) (?: | \s+ .+)$ ]x
174 1 0 0 $key eq 'Status' and $line =~ /^(\d+) (?:|\s+(.+?))$/xi
198 0 0 0 ref $app eq 'ARRAY' and not @$app
230 0 0 0 not $dispatch{'/'} and $first
349 0 0 2 defined $req and $req =~ m[ ^\s*(GET|POST|PUT|PATCH|DELETE|PUSH|HEAD|OPTIONS)\s+(.+)\s+(HTTP/1\.[01])\s*$ ]xi
503 0 0 0 $1 and $orig
0 0 0 $1 and $orig and $1 eq '<'
511 0 0 0 $2 && (substr($2, 0, 1) eq '!' ? index($2, $info->{'response_status'}) != -1 : index($2, $info->{'response_status'}) == -1)
514 0 0 0 defined $v and length $v

or 2 conditions

line l !l condition
132 0 0 $_[1] || 0
140 1 1 $request_info->{'response_size'} || 0
146 0 1 do { *$client }->{'headers'} ||= {'unparsed', '', 'parsed', ''}
158 1 0 $headers->{'status'} || die("Premature end of script headers\n")
175 0 0 $2 || '-'
181 0 1 $headers->{'status'} ||= [200, 'OK']
319 0 0 "$@" || 'Something happened'
375 0 2 $self->script_name($ENV{'PATH_INFO'}) || ''
401 0 2 $ENV{'CONTENT_LENGTH'} || 0
462 2 0 $prop->{'access_log_format'} || (return)
463 0 2 $prop->{'access_log_function'} || (return)
511 0 0 $info->{'response_size'} || '-'
522 0 0 $fmt || '%d/%b/%Y:%T %z'
568 0 0 "$@" || "Error while running trusted perl script\n"
587 0 0 $? >> 8 || -1
600 0 0 $ENV{'CONTENT_LENGTH'} || 0
611 0 0 $printed ||= 1

or 3 conditions

line l !l&&r !l&&!r condition
89 2 0 0 not $log or $log eq '/dev/null'
92 0 0 0 $log eq 'STDOUT' or $log eq '/dev/stdout'
0 0 0 $log eq 'STDERR' or $log eq '/dev/stderr'
198 1 0 0 not $app or ref $app eq 'ARRAY' and not @$app
225 0 0 0 $first ||= $key
251 1 1 0 $msg ||= $status == 200 ? 'OK' : '-'
302 1 0 0 shift() || $self->{'server'}{'client'}
329 1 1 0 shift() || $self->{'server'}{'client'}
392 0 2 0 $prop->{'peerhost'} || $info->{'peeraddr'}
548 0 0 0 $self->http_log_header_in($info, 'Host') || $self->{'server'}{'client'}->NS_host || $self->{'server'}{'sockaddr'}