Condition Coverage

blib/lib/Net/Server/HTTP.pm
Criterion Covered Total %
condition 22 88 25.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 } }
137 1 1 0 not $headers->{'parsed'} and $line =~ m[^HTTP/(1.[01]) \s+ (\d+) (?: | \s+ .+)$ ]x
160 1 0 0 $key eq 'Status' and $line =~ /^(\d+) (?:|\s+(.+?))$/xi
184 0 0 0 ref $app eq 'ARRAY' and not @$app
216 0 0 0 not $dispatch{'/'} and $first
335 0 0 2 defined $req and $req =~ m[ ^\s*(GET|POST|PUT|DELETE|PUSH|HEAD|OPTIONS)\s+(.+)\s+(HTTP/1\.[01])\s*$ ]xi
489 0 0 0 $1 and $orig
0 0 0 $1 and $orig and $1 eq '<'
497 0 0 0 $2 && (substr($2, 0, 1) eq '!' ? index($2, $info->{'response_status'}) != -1 : index($2, $info->{'response_status'}) == -1)
500 0 0 0 defined $v and length $v

or 2 conditions

line l !l condition
118 0 0 $_[1] || 0
126 1 1 $request_info->{'response_size'} || 0
132 0 1 do { *$client }->{'headers'} ||= {'unparsed', '', 'parsed', ''}
144 1 0 $headers->{'status'} || die("Premature end of script headers\n")
161 0 0 $2 || '-'
167 0 1 $headers->{'status'} ||= [200, 'OK']
305 0 0 "$@" || 'Something happened'
361 0 2 $self->script_name($ENV{'PATH_INFO'}) || ''
387 0 2 $ENV{'CONTENT_LENGTH'} || 0
448 2 0 $prop->{'access_log_format'} || (return)
449 0 2 $prop->{'access_log_function'} || (return)
497 0 0 $info->{'response_size'} || '-'
508 0 0 $fmt || '%d/%b/%Y:%T %z'
554 0 0 "$@" || "Error while running trusted perl script\n"
573 0 0 $? >> 8 || -1
586 0 0 $ENV{'CONTENT_LENGTH'} || 0
597 0 0 $printed ||= 1

or 3 conditions

line l !l&&r !l&&!r condition
79 2 0 0 not $log or $log eq '/dev/null'
184 1 0 0 not $app or ref $app eq 'ARRAY' and not @$app
211 0 0 0 $first ||= $key
237 1 1 0 $msg ||= $status == 200 ? 'OK' : '-'
288 1 0 0 shift() || $self->{'server'}{'client'}
315 1 1 0 shift() || $self->{'server'}{'client'}
378 0 2 0 $prop->{'peerhost'} || $info->{'peeraddr'}
534 0 0 0 $self->http_log_header_in($info, 'Host') || $self->{'server'}{'client'}->NS_host || $self->{'server'}{'sockaddr'}