Condition Coverage

blib/lib/PAGI/Response.pm
Criterion Covered Total %
condition 56 63 88.8


and 3 conditions

line !l l&&!r l&&r condition
1023 44 136 1 defined $scope and ref $scope ne "HASH"
1033 1 1 58 $code =~ /^\d+$/ and $code >= 100
2 1 57 $code =~ /^\d+$/ and $code >= 100 and $code <= 599
1349 3 2 1 $origin eq "*" and $credentials
1529 11 1 2 builtin::blessed($r) and $r->isa("Future")

or 2 conditions

line l !l condition
1032 50 87 $self->{'_status'} // 200
1118 3 76 $charset //= "utf-8"
1123 35 0 $type //= ""
1180 108 0 $self->{'_body'} // ""
1220 3 49 $charset //= "utf-8"
1221 52 0 $str // ""
1249 17 0 $body // ""
1257 0 3 $opts{'charset'} // "utf-8"
1296 9 4 $status // 302
1339 4 2 $opts{'origin'} // "*"
1340 2 4 $opts{'credentials'} // 0
1341 1 5 $opts{'methods'} // ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
1342 1 5 $opts{'headers'} // ["Content-Type", "Authorization", "X-Requested-With"]
1343 1 5 $opts{'expose'} // []
1344 1 5 $opts{'max_age'} // 86400
1345 1 5 $opts{'preflight'} // 0
1351 1 0 $opts{'request_origin'} // "*"
1428 2 5 $ext // ""
1 6 $MIME_TYPES{lc($ext // "")} // "application/octet-stream"
1442 5 5 $opts{'offset'} // 0
1509 15 0 $chunk // ""

or 3 conditions

line l !l&&r !l&&!r condition
1098 1 1 2 exists $self->{'_body'} || exists $self->{'_stream'} || exists $self->{'_file'}
1125 28 1 6 lc $type eq "application/json" or $type =~ /\+json\z/i