Branch Coverage

blib/lib/Dancer/Plugin/SporeDefinitionControl.pm
Criterion Covered Total %
branch 40 50 80.0


line true false branch
105 6 0 if ($path_to_spore_def)
107 6 0 unless 'File::Spec'->file_name_is_absolute($path_to_spore_def)
120 2 26 if (defined $query_params)
136 2 4 if defined $build_options_route
172 0 73 unless defined $req->method
173 3 70 unless defined $req->{'_route_pattern'}
177 0 70 unless $path_validation
178 8 62 unless (defined $Dancer::Plugin::SporeDefinitionControl::path_validation->{'method'}{$req->method} or uc $req->method eq 'OPTIONS')
185 8 16 unless (defined $Dancer::Plugin::SporeDefinitionControl::path_validation->{'method'}{$req->method}{$req->{'_route_pattern'}} or uc $req->method eq 'OPTIONS' and defined $Dancer::Plugin::SporeDefinitionControl::path_validation->{'path'}{$req->{'_route_pattern'}})
195 16 38 if uc $req->method eq 'OPTIONS'
203 3 43 if ($route_defined->{'form_data_params'})
213 18 63 unless (defined params()->{$required_param})
219 16 30 if $ko
222 30 0 if defined $ra_required_params
223 30 0 if defined $ra_optional_params
224 3 27 if defined $ra_form_data_params
229 10 69 unless (grep {/^$param$/;} @list_total)
235 10 20 if $ko
238 18 20 unless $is_ok
255 0 0 unless $path_validation
271 18 19 if ($code_error == 400) { }
19 0 elsif ($code_error == 404) { }
287 16 0 if (defined $methods) { }
312 10 1 if defined $req->header('Origin') and defined $build_options_route->{'header_allow_allow_origins'} and $req->header('Origin') ~~ \@{$$build_options_route{'header_allow_allow_origins'};}
317 10 26 if defined $origin_allowed