Branch Coverage

blib/lib/Dancer/Plugin/RPC/RESTISH.pm
Criterion Covered Total %
branch 50 52 96.1


line true false branch
56 5 11 if (exists $dispatch_builder_map{$_})
58 1 4 if $_ eq "config"
80 3 13 $arguments->{'code_wrapper'} ? :
87 1 32 if (request()->body and $ct ne "application/json")
101 1 10 if ($allow_origin and $has_origin and not $allowed_origin)
122 5 26 $is_preflight ? :
131 14 49 if ($allow_origin and $is_preflight) { }
137 28 35 if $hm ne $check_for_method
141 29 6 if ($method_name =~ /^$route_match$/)
148 2 29 unless ($found_match)
149 1 1 if ($allow_origin and $is_preflight)
162 9 20 if ($allow_origin and $has_origin)
163 9 0 $allow_origin eq '*' ? :
167 4 25 if ($is_preflight)
170 0 4 if request()->header("Access-Control-Request-Headers")
181 6 19 request()->body ? :
207 8 17 $callback ? :
213 1 24 if ($error) { }
1 23 elsif (not &blessed($continue) && $continue->isa('Dancer::RPCPlugin::CallbackResult')) { }
2 21 elsif (&blessed($continue) and not $continue->success) { }
250 3 18 if (my $error = $@)
251 1 2 &blessed($error) && $error->can('as_restish_error') ? :
261 1 20 if (&blessed($response) and $response->can('as_restish_error')) { }
1 19 elsif (&blessed($response)) { }
271 13 12 if (config()->{'encoding'} and config()->{'encoding'} =~ /^utf-?8$/i)
280 24 1 ref $response ? :