Condition Coverage

blib/lib/Dancer2/Plugin/RPC/RESTISH.pm
Criterion Covered Total %
condition 44 55 80.0


and 3 conditions

line !l l&&!r l&&r condition
82 25 6 1 $http_request->body and $ct ne "application/json"
97 20 5 6 $has_origin_header && $http_method eq 'OPTIONS'
102 20 0 11 $allow_origin and $has_origin
20 10 1 $allow_origin and $has_origin and not $allowed_origin
134 31 14 14 $allow_origin and $is_preflight
155 0 0 1 $allow_origin and $is_preflight
173 20 0 9 $allow_origin and $has_origin_header
228 1 0 23 &blessed($continue) && $continue->can('does') && $continue->does('Dancer2::RPCPlugin::CallbackResult')
0 21 2 &blessed($continue) and not $continue->success
278 2 0 1 &blessed($error) && $error->can('as_restish_error')
288 19 1 1 &blessed($response) and $response->can("as_restish_error")
298 12 0 13 $dsl->config->{'encoding'} and $dsl->config->{'encoding'} =~ /^utf-?8$/i

or 2 conditions

line l !l condition
49 2 14 $arguments->{'plugin_args'} || {}
51 2 14 $restish_args->{'cors_allow_origin'} || ''
79 6 26 $http_request->content_type // ""
80 6 26 $ct //= ""
93 11 20 $http_request->header('Origin') || ''
125 3 2 $http_request->header("Access-Control-Request-Method") // "GET"
196 25 0 $http_request->params("route") // {}
197 0 25 $http_request->params("query") // {}

or 3 conditions

line l !l&&r !l&&!r condition
95 10 0 21 $allow_origin eq '*' || grep({$_ eq $has_origin;} @allowed_origins)