Condition Coverage

lib/HTTP/Promise/Response.pm
Criterion Covered Total %
condition 50 73 68.4


and 3 conditions

line !l l&&!r l&&r condition
35 5 0 0 @_ == 1 and ref $_[0] eq "HASH"
0 0 5 @_ >= 2 and defined $_[0]
0 0 5 @_ >= 2 and defined $_[0] and $_[0] =~ /^\d{3}$/
0 5 0 @_ >= 2 and defined $_[0] and $_[0] =~ /^\d{3}$/ and defined $_[1] && $_[1] =~ /\S/ || !defined($_[1])
76 1 3 0 $base and $base =~ /^[a-zA-Z][a-zA-Z0-9.+\-]*:/
124 3 1 9 $response_time and $date
132 6 3 4 $age_v and $age_v > $age
145 1 1 6 $request_time and $request_time < $response_time
182 5 0 5 defined $file and length $file
208 3 7 0 $file and not length $file
234 0 0 6 defined $cc and length "$cc"
253 15 1 4 exists $opts->{'heuristic_expiry'} and not $opts->{'heuristic_expiry'}
306 2 0 1 defined $str and length $str

or 2 conditions

line l !l condition
256 2 14 $opts->{'h_min'} ||= 60
257 1 15 $opts->{'h_max'} ||= 86400
259 1 15 $opts->{'h_lastmod_fraction'} ||= "0.1"
260 1 15 $opts->{'h_default'} ||= 3600
313 1 0 $p->parse($str) || (return $self->pass_error($p->error))
341 3 1 $self->protocol || 'HTTP/1.1'
351 3 3 $self->code || '000'
352 3 3 $self->status || 'HTTP::Promise::Status'->status_message($code) || 'Unknown code'

or 3 conditions

line l !l&&r !l&&!r condition
35 5 0 0 defined $_[1] && $_[1] =~ /\S/ || !defined($_[1])
151 4 6 0 $time || time
220 1 4 0 $opts->{'time'} ||= time
246 3 9 0 ($h_date ? $h_date->epoch : '') || ($h_client_date ? $h_client_date->epoch : '') || $opts->{'time'} || time
286 1 2 0 $opts->{'time'} ||= time
304 0 2 0 ref $self || $self