Branch Coverage

lib/Web/DataService/Execute.pm
Criterion Covered Total %
branch 0 236 0.0


line true false branch
33 0 0 if defined $attrs and ref $attrs ne 'HASH'
41 0 0 unless (ref $ds eq 'Web::DataService')
53 0 0 unless (defined $attrs->{'path'})
73 0 0 if ref $request->{'outer'}
95 0 0 if (my $path_param = $ds->{'special'}{'path'}) { }
0 0 elsif (defined $request_path) { }
106 0 0 if (defined $ds->{'path_re'} and $request_path =~ /$ds->{'path_re'}/) { }
138 0 0 unless (ref $ds eq 'Web::DataService')
172 0 0 unless (ref $ds eq 'Web::DataService')
182 0 0 if ('Web::DataService'->is_mode('diagnostic'))
191 0 0 if ($http_method eq 'OPTIONS')
193 0 0 ref $allow_method eq 'HASH' ? :
203 0 0 if (ref $ds->{'hook_enabled'} eq 'HASH')
207 0 0 if (my $hook_list = $ds->node_attr($path, $hook_name))
218 0 0 if ($request->{'is_invalid_request'})
221 0 0 if $request->{'hook_enabled'}{'invalid_request_hook'}
223 0 0 if $request->{'is_invalid_request'}
229 0 0 if $request->{'hook_enabled'}{'before_execute_hook'}
234 0 0 if ($request->{'is_node_path'} and $request->{'is_doc_request'} and $ds->has_feature('documentation')) { }
0 0 elsif ($request->{'is_file_path'} and $ds->has_feature('send_files')) { }
0 0 elsif ($request->{'is_node_path'} and $ds->node_has_operation($path)) { }
236 0 0 unless ($http_method eq 'GET' or $http_method eq 'HEAD')
250 0 0 unless ($http_method eq 'GET' or $http_method eq 'HEAD')
266 0 0 $http_method eq 'HEAD' ? :
268 0 0 unless ($allow_method->{$http_method} or $allow_method->{$check_method})
294 0 0 if $request->{'is_invalid_request'}
305 0 0 if ($file_dir) { }
307 0 0 unless defined $rest_path and $rest_path ne ''
319 0 0 if defined $rest_path and $rest_path ne ''
329 0 0 unless ($Web::DataService::FOUNDATION->file_readable($file_path))
331 0 0 if $Web::DataService::FOUNDATION->file_exists($file_path)
354 0 0 if $role and $method
369 0 0 if $request->{'is_invalid_request'} or $ds->node_attr($path, 'disabled')
377 0 0 if ($Web::DataService::ONE_REQUEST)
386 0 0 if $request->{'hook_enabled'}{'before_config_hook'}
399 0 0 if ($rs_name) { }
405 0 0 if ($result->errors) { }
0 0 elsif ($result->warnings) { }
419 0 0 if ($ds->debug)
426 0 0 if ref $value eq 'ARRAY'
438 0 0 if $ds->debug
449 0 0 unless ($request->output_format)
457 0 0 if ($format_param)
474 0 0 if $format
485 0 0 if defined $limit_value
492 0 0 if defined $offset_value
500 0 0 if defined $header_value
505 0 0 if defined $source_value
510 0 0 if defined $count_value
520 0 0 if ($save_specified)
522 0 0 if ($save_value =~ qr/ ^ (?: no | off | 0 | false ) $ /six) { }
530 0 0 if $save_value ne '' and not $save_value =~ qr/ ^ (?: yes | on | 1 | true ) $ /six
540 0 0 if defined $vocab_value
557 0 0 unless $request->{'_configured'}
574 0 0 if $request->{'hook_enabled'}{'before_setup_hook'}
579 0 0 unless ($ds->valid_format_for($path, $format))
594 0 0 unless (my $vocab_value = $request->output_vocab)
613 0 0 if (defined $save_flag and $save_flag eq '0') { }
0 0 elsif (defined $disp and $disp eq 'attachment' or $save_flag) { }
616 0 0 if $ds->{'format'}{$format}{'is_text'}
635 0 0 if (my $summary_block = $ds->node_attr($request, 'summary'))
637 0 0 if ($ds->configure_block($request, $summary_block)) { }
651 0 0 if $request->{'hook_enabled'}{'post_configure_hook'}
654 0 0 if $request->{'hook_enabled'}{'before_operation_hook'}
673 0 0 if $request->{'hook_enabled'}{'before_output_hook'}
698 0 0 if (ref $request->{'main_record'}) { }
0 0 elsif (ref $request->{'main_sth'} or ref $request->{'main_result'}) { }
0 0 elsif (defined $request->{'main_data'}) { }
706 0 0 unless $request->{'do_not_stream'}
714 0 0 if $request->display_counts and $request->{'process_before_count'}
716 0 0 if ($request->{'preprocess'}) { }
761 0 0 if (ref $hook eq 'CODE') { }
0 0 elsif (defined $hook) { }
800 0 0 if (defined $arg and $arg eq '*' or $ds->node_attr($request, 'public_access'))
824 0 0 unless ($ct)
840 0 0 if ($disp eq 'inline')
853 0 0 unless $filename
858 0 0 unless ($filename =~ qr/ [^.] [.] \w+ $ /sx)
878 0 0 unless ref $allow_format eq 'HASH'
900 0 0 if (defined $ruleset and $ruleset ne '')
902 0 0 unless $validator->ruleset_defined($ruleset)
911 0 0 if defined $ruleset
915 0 0 unless defined $path and $path ne '' and $path ne '/'
923 0 0 if defined $ds->{'ruleset_prefix'} and $ds->{'ruleset_prefix'} ne ''
925 0 0 if $validator->ruleset_defined($path)
943 0 0 if ref $self->{'attrs'}{'output'} eq 'ARRAY'
952 0 0 unless ref $ds->{'set'}{$output_name} eq 'Web::DataService::Set' or ref $ds->{'block'}{$output_name} eq 'Web::DataService::Block'
978 0 0 if ($ds->{'feature'}{'format_suffix'})
989 0 0 if (my $format_param = $ds->{'special'}{'format'})
994 0 0 if (ref $inner and &reftype($inner) eq 'HASH' and $inner->{'clean_params'}) { }
997 0 0 if $inner->{'clean_params'}{$format_param}
1006 0 0 if $params->{$format_param}
1014 0 0 if (ref $inner and $inner->isa('Web::DataService::Request'))
1018 0 0 if $default_format
1048 0 0 if ('Web::DataService'->is_mode('debug'))
1050 0 0 do { $error->isa('Web::DataService::Exception') } ? :
0 0 do { $error->isa('Dancer::Exception::Base') } ? :
0 0 do { $error->isa('HTTP::Validate::Result') } ? :
0 0 do { not ref $error } ? :
0 0 defined $error ? :
1088 0 0 if (ref $request and $request->isa('Web::DataService::Request')) { }
0 0 elsif (defined $request) { }
1114 0 0 defined $inner && $inner->isa('Web::DataService::Request') ? :
1120 0 0 if $inner
1126 0 0 if (ref $inner and $inner->isa('Web::DataService::Request'))
1137 0 0 if (ref $error eq 'HTTP::Validate::Result') { }
0 0 elsif (ref $error eq 'Web::DataService::Exception') { }
0 0 elsif ($error =~ qr/ ^ (\d\d\d) \s+ (.+) /sx) { }
0 0 elsif ($error =~ qr/ ^ (\d\d\d) /sx) { }
1146 0 0 unless @errors
1165 0 0 if ($code eq '404') { }
0 0 elsif ($CODE_STRING{$code}) { }
1168 0 0 if (defined $path and $path ne '') { }
1186 0 0 unless @errors
1204 0 0 if $format
1206 0 0 if ($format_class and $format_class->can('emit_error')) { }
1230 0 0 unless $warnings[0]
1232 0 0 if (@warnings)