Branch Coverage

blib/lib/OpenAPI/Modern.pm
Criterion Covered Total %
branch 668 734 91.0


line true false branch
104 5 324 unless $request
107 2 322 if $$options{"request"} and $request != $$options{"request"}
110 24 298 $self->with_defaults ? :
129 11 311 unless $path_ok
133 2 309 keys %$server ? :
147 311 295 $section eq 'operation' ? :
148 689 154 $section eq 'operation' ? :
149 689 154 $section eq 'operation' ? :
154 320 515 $$param_obj{'in'} eq 'header' ? :
159 4 831 if (($$request_parameters_processed{$$param_obj{"in"}} // {})->{$fc_name} // "") eq $section
163 2 829 if $seen_q{"query"} and $seen_q{"querystring"}
166 2 827 if ($seen_q{"querystring"} // 0) >= 2
171 16 811 if exists $$request_parameters_processed{$$param_obj{"in"}}{$fc_name}
186 43 0 $$param_obj{'in'} eq 'querystring' ? :
82 43 $$param_obj{'in'} eq 'cookie' ? :
308 125 $$param_obj{'in'} eq 'header' ? :
228 433 $$param_obj{'in'} eq 'query' ? :
150 661 $$param_obj{'in'} eq 'path' ? :
43 0 $$param_obj{'in'} eq 'querystring' ? :
82 43 $$param_obj{'in'} eq 'cookie' ? :
308 125 $$param_obj{'in'} eq 'header' ? :
228 433 $$param_obj{'in'} eq 'query' ? :
150 661 $$param_obj{'in'} eq 'path' ? :
200 2 144 unless exists(($$request_parameters_processed{"path"} // {})->{$path_name})
207 2 283 if defined $request->headers->content_length and $request->content->is_chunked
213 2 123 if $request->body_size and not $request->headers->content_length and not $request->content->is_chunked
218 152 133 if (my $body_obj = $$operation{'requestBody'}) { }
225 119 31 if ($request->body_size) { }
5 26 elsif ($$body_obj{'required'}) { }
236 8 103 if $request->method eq 'GET' || $request->method eq 'HEAD' and $request->headers->content_length // $request->body_size
242 0 34 if (builtin::blessed($e) and $e->isa('JSON::Schema::Modern::Result')) { }
34 0 elsif (builtin::blessed($e) and $e->isa('JSON::Schema::Modern::Error')) { }
257 1 78 unless $response
260 4 74 if (my $request = $response->can('request') && $response->request)
262 1 3 if $request and $$options{"request"} and $request != $$options{"request"}
267 0 77 if $$options{"response"} and $response != $$options{"response"}
270 4 73 $self->with_defaults ? :
279 15 62 if exists $$options{"operation_id"}
280 56 21 if exists $$options{"path_template"} and exists $$options{"method"}
287 5 72 unless $path_ok
295 3 69 unless exists $$operation{"responses"}
297 8 61 if ($response->headers->header("Transfer-Encoding"))
298 4 4 if $response->is_info or $response->code == 204
304 2 6 if $response->is_success and $$options{"method"} eq "CONNECT"
309 2 67 if defined $response->headers->content_length and $response->content->is_chunked
315 5 41 if $response->body_size and not $response->headers->content_length and not $response->content->is_chunked
319 1 68 unless ($response->code)
327 2 66 unless ($response_name)
340 8 40 if fc $header_name eq "content-type"
357 48 6 if exists $$response_obj{"content"} and $response->headers->content_length // $response->body_size
360 0 6 if (builtin::blessed($e) and $e->isa('JSON::Schema::Modern::Result')) { }
6 0 elsif (builtin::blessed($e) and $e->isa('JSON::Schema::Modern::Error')) { }
390 5 565 if $DEBUG or $self->debug
397 4 42 unless $$options{"request"} or exists $$options{"uri"} and exists $$options{"method"} or $$options{"path_template"} and exists $$options{"method"} or exists $$options{"operation_id"}
402 25 11 if $_ ne "string" and $_ ne "number"
403 1 565 if exists $$options{"path_captures"} and CORE::any {$_ ne "integer" if $_ ne "string" and $_ ne "number";} map(get_type($_), values %{$$options{"path_captures"}})
406 334 231 if ($$options{'request'}) { }
121 110 elsif (exists $$options{'uri'}) { }
410 8 326 if (my $error = $$options{"request"}->error)
416 1 325 if exists $$options{"uri"} and $$options{"request"}->url ne $$options{"uri"}
421 2 323 if exists $$options{"method"} and $$options{"request"}->method ne $$options{"method"}
426 119 2 unless builtin::blessed($$options{"uri"}) and $$options{"uri"}->isa("Mojo::URL")
430 81 473 if (exists $$options{"operation_id"})
435 4 77 unless $operation_path
446 69 8 $parts[-2] ne 'additionalOperations' || $self->openapi_document->get_entity_at_location(jsonp(@parts[0 .. $#parts - 1])) eq 'path-item' ? :
460 4 8 $$options{'uri'} ? :
4 8 $$options{'uri'} ? :
1 11 !$$options{'uri'} && $$options{'method'} eq lc $$options{'method'} && exists $self->openapi_document->get($path_item_path)->{$$options{'method'}} ? :
12 65 if exists $$options{"method"} and $$options{"method"} ne $method
464 27 22 unless ($$options{"path_template"} or $$options{"uri"})
484 2 1 $$options{'uri'} ? :
3 508 if exists $$options{"path_template"} and not exists $$schema{"paths"}{$$options{"path_template"}}
488 411 97 if (not $$options{'path_template'} and $$options{'uri'}) { }
26 71 elsif ($$options{'uri'}) { }
497 395 294 if ($captures)
502 17 10 if exists $$options{"operation_id"} and !exists($$local_state{'operation'}{'operationId'}) || $$local_state{'operation'}{'operationId'} ne $$options{'operation_id'}
510 7 287 if (@{$$local_state{"errors"}})
521 26 378 unless exists $$options{"path_template"}
530 8 18 unless ($captures)
535 0 8 if (@{$$state{"errors"}})
545 8 3 if (exists $$options{"operation_id"} and !exists($$state{'operation'}{'operationId'}) || $$state{'operation'}{'operationId'} ne $$options{'operation_id'})
553 5 3 exists $$state{'operation'}{'operationId'} ? :
568 67 4 elem($$options{'method'}, ['GET', 'PUT', 'POST', 'DELETE', 'OPTIONS', 'HEAD', 'PATCH', 'TRACE', 'QUERY']) ? :
574 1 4 exists $$options{'method'} && $$options{'method'} eq lc $$options{'method'} && exists $$state{'path_item'}{$$options{'method'}} ? :
5 66 unless $$state{"operation"}
582 1 2 exists $$state{'operation'}{'operationId'} ? :
3 0 if exists $$options{"operation_id"} and !exists($$state{'operation'}{'operationId'}) || $$state{'operation'}{'operationId'} ne $$options{'operation_id'}
593 47 404 if exists $$options{"_operation"}{"operationId"}
598 7 1 $$options{'uri'} ? :
8 443 if exists $$options{"path_captures"} and not is_equal([sort(keys %{$$options{"path_captures"}})], [sort(@path_capture_names)])
600 62 381 unless $captures
604 4 377 if (exists $$options{'uri_captures'}) { }
607 1 0 $$options{'uri'} ? :
1 3 unless is_equal([sort(keys %{$$options{"uri_captures"}})], [sort(@uri_capture_names)])
610 1 2 unless (is_equal([@$$options{"uri_captures"}{@uri_capture_names}], [@$captures{@uri_capture_names}], my $equal_state = {"stringy_numbers", 1}))
619 21 358 if (exists $$options{'path_captures'}) { }
621 3 18 unless (is_equal([@$$options{"path_captures"}{@path_capture_names}], [@$captures{@path_capture_names}], my $equal_state = {"stringy_numbers", 1}))
641 1 32 if $depth++ > $self->evaluator->max_depth
646 1 31 unless $schema_info
648 1 1 $entity_type =~ /^[aeiou]/u ? :
2 29 if $entity_type and $this_entity ne $entity_type
654 22 7 if (defined($ref = $$schema{"\$ref"}) and not elem($this_entity, ["schema", "callbacks"]))
658 1 0 if elem($this_entity, ["response", "example", "path-item"]) and exists $$schema{"summary"} and not exists $$parent_obj{"summary"}
660 1 21 if exists $$schema{"description"} and not exists $$parent_obj{"description"}
667 5 0 wantarray ? :
685 287 785 substr($_, 0, 1) eq '{' ? :
692 7 708 if (exists $$state{"debug"})
693 278 437 unless $uri =~ /$path_pattern\z/u
721 431 6 elem($method, ['GET', 'PUT', 'POST', 'DELETE', 'OPTIONS', 'HEAD', 'PATCH', 'TRACE', 'QUERY']) ? :
723 11 426 unless $$local_state{"operation"}
733 13 389 exists $self->openapi_document->schema->{'servers'} ? :
7 402 exists $$local_state{'path_item'}{'servers'} ? :
17 409 exists $$local_state{'operation'}{'servers'} ? :
739 390 36 unless $servers and @$servers
759 21 478 $_ eq '%00' ? :
763 7 457 if (exists $$state{"debug"})
764 44 420 unless $uri_prefix =~ /^$server_pattern\z/u
772 3 14 /^xn--(.+)\z/u ? :
790 1 2 defined $base_schema_uri ? :
3 229 if $seen{$name}++
792 3 417 unless $valid
798 3 15 unless exists((($$server{"variables"} // {})->{$name} // {})->{"enum"})
806 1 3 defined $base_schema_uri ? :
4 11 unless elem($captures{$name}, $$server{"variables"}{$name}{"enum"})
809 4 413 unless $valid
833 43 0 $in eq 'querystring' ? :
219 43 $in eq 'cookie' ? :
399 262 $in eq 'header' ? :
454 661 $in eq 'query' ? :
346 1115 $in eq 'path' ? :
841 139 1312 if @{$$state{"errors"}} > $error_count
845 277 1035 if (exists $$obj{"content"})
854 1272 40 if $in ne "querystring"
856 365 947 unless ($data_ref)
861 36 0 ref $$obj{'schema'}{'default'} ? :
36 26 if $$state{"defaults"} and exists $$obj{"schema"} and ref $$obj{"schema"} eq "HASH" and exists $$obj{"schema"}{"default"}
871 123 824 if exists $$obj{"schema"} and not $self->_evaluate_subschema($data_ref, $$obj{"schema"}, {%$state, "depth", $$state{"depth"} + 1, "keyword_path", $$state{"keyword_path"} . '/schema'})
873 16 931 if (exists $$obj{"itemSchema"})
874 2 14 if ref $$data_ref ne "ARRAY"
881 12 4 unless $self->_evaluate_subschema(\$Deparse error: Unexpected our($$data_ref) [$idx], $$obj{"itemSchema"}, {%$state, "depth", $$state{"depth"} + 1, "data_path", $$state{"data_path"} . '/' . $idx, "keyword_path", $$state{"keyword_path"} . '/itemSchema'})
894 4 342 unless exists $$path_captures{$$param_obj{"name"}}
899 2 340 if ($data // "") =~ /[^\x00-\x7F]/u
906 49 291 if exists $$param_obj{"content"}
918 0 454 unless builtin::blessed($params) and $params->isa("Mojo::Parameters")
921 110 344 if (exists $$param_obj{"content"})
923 64 46 if (not defined $data or $$param_obj{"allowEmptyValue"} and not length $data)
925 2 62 if $$param_obj{"required"}
940 134 104 $style eq 'form' ? :
951 23 320 if @{$$state{"errors"}} > $error_count
953 89 231 unless ($data_ref)
954 24 65 if ($$param_obj{"required"})
960 3 21 $style eq 'form' && $explode && @types != 6 && elem('object', \@types) ? :
973 0 399 unless builtin::blessed($headers) and $headers->isa("Mojo::Headers")
976 3 396 if grep((fc $header_name eq fc $_), ("Accept", "Content-Type", "Authorization"))
979 0 396 if $header_name =~ /[^\x00-\x7F]/u
982 191 205 unless (@{$headers->every_header($header_name)})
984 13 178 if $$header_obj{"required"}
990 2 203 if CORE::any {/[^\x00-\xFF]/u;} @{$headers->every_header($header_name)}
996 32 171 if exists $$header_obj{"content"}
1030 0 219 unless builtin::blessed($headers) and $headers->isa("Mojo::Headers")
1035 38 181 unless (@$cookie)
1036 3 35 if $$param_obj{"required"}
1040 0 181 if @$cookie > 1
1048 4 177 if (my(@missing_values) = grep((!defined($our $_[1])), @pairs))
1053 3 178 if (my(@bad_names) = grep((!is_cookie_name($_)), map($our $_[0], @pairs)))
1058 5 176 if (my(@bad_values) = grep((defined $our $_[1] && !is_cookie_value($our $_[1])), @pairs))
1063 12 169 if @{$$state{"errors"}} > $error_count
1065 20 149 if (exists $$param_obj{"content"})
1068 2 18 unless (defined $data)
1070 1 1 if $$param_obj{"required"}
1082 96 53 if ($style eq "form")
1087 18 77 if ($explode and @types != 6 and elem('object', \@types)) { }
1088 1 17 if (@pairs > 1)
1095 14 3 @pairs ? :
1102 62 15 @data ? :
1108 0 147 if $error_count != @{$$state{"errors"}}
1116 2 145 if @{$$state{"errors"}} > $error_count
1118 21 124 unless ($data_ref)
1119 8 13 if ($$param_obj{"required"})
1125 2 6 $style eq 'form' && $explode && @types != 6 && elem('object', \@types) ? :
1134 0 43 unless builtin::blessed($params) and $params->isa("Mojo::Parameters")
1142 11 32 unless (exists $$params{"string"})
1145 1 10 if exists $$params{"pairs"} and @{$$params{"pairs"}}
1147 3 8 if $$param_obj{"required"}
1154 0 32 if $data =~ /[^\x00-\x7F]/u
1172 0 953 if not defined $data or ref $data and ref $data ne "Mojo::Parameters"
1181 460 490 if ($style eq 'simple' or $style eq 'matrix' or $style eq 'label') { }
313 177 elsif ($style eq 'form') { }
94 83 elsif ($style eq 'spaceDelimited' or $style eq 'pipeDelimited') { }
30 53 elsif ($style eq 'deepObject') { }
53 0 elsif ($style eq 'cookie') { }
1185 68 5 if ($data eq "" and $style ne 'simple' || @types != 6)
1186 10 58 if (elem('null', \@types)) { }
26 32 elsif (elem('array', \@types)) { }
26 6 elsif (elem('object', \@types)) { }
1202 63 0 $style eq 'matrix' ? :
58 63 $style eq 'label' ? :
277 121 $style eq 'simple' ? :
1208 1 397 if length $prefix and not $data =~ s/^$prefix//u
1212 22 0 $style eq 'label' ? :
23 22 $style eq 'matrix' ? :
24 45 $style eq 'simple' ? :
178 69 !$explode ? :
150 247 $style eq 'simple' && $strip_internal_ws ? :
1230 66 22 if (@types != 6 and $explode and ($style eq 'simple' || $style eq 'label') && elem('object', \@types) || $style eq 'matrix' && elem(['object', 'array'], \@types))
1236 56 10 elem('object', \@types) ? :
1250 10 3 $type eq 'object' ? :
13 176 if defined $val and not length $val
1260 1 0 defined $our $_[0] ? :
1 27 if not defined $our $_[0] or $our $_[0] ne $name
56 10 $type eq 'object' ? :
1269 54 12 unless (@errors)
1270 46 8 if $type eq "object"
1271 8 46 if $type eq "array"
1277 2 37 if ($style eq "matrix" and !$explode || elem(['string', 'number', 'boolean', 'null'], \@types) and !($data =~ s/^([^{}=]+)(?:=(?=.)|$)//u) || uri_decode($1) ne $name)
1293 144 197 if (@types != 6 and elem(["array", "object"], \@types))
1296 59 85 if (not $explode and elem("object", \@types))
1297 49 10 unless (@values % 2)
1305 78 3 if (elem("array", \@types) and elem($style, ['simple', 'label']) || $style eq 'matrix' && !$explode)
1314 188 26 if @types == 6 or coerce_primitive(\$data, \@types)
1316 8 18 if (@errors)
1324 0 313 if ref $data ne "Mojo::Parameters"
1329 208 105 if ($explode and @types != 6)
1330 38 170 if (elem("array", \@types))
1332 6 32 if $allowEmptyValue
1334 25 13 @$data ? :
1337 40 130 if (elem("object", \@types))
1340 4 36 if $allowEmptyValue
1342 31 9 keys %$data ? :
1350 67 168 if not defined $data or $allowEmptyValue and not length $data
1352 35 1 if ($in ne "cookie" and not $explode and @types != 6 and elem(["array", "object"], \@types))
1357 15 20 if (not @values % 2 and elem("object", \@types))
1362 18 2 if (elem("array", \@types))
1369 126 9 if @types == 6 or coerce_primitive(\$data, \@types)
1373 0 94 if ref $data ne "Mojo::Parameters"
1375 4 90 if $explode
1378 6 84 unless elem(["array", "object"], \@types)
1383 12 72 if not defined $data or $allowEmptyValue and not length $data
1396 36 0 $style eq 'pipeDelimited' ? :
36 36 $style eq 'spaceDelimited' ? :
1399 24 48 if (not @values % 2 and elem("object", \@types))
1404 44 4 if (elem("array", \@types))
1412 0 30 if ref $data ne "Mojo::Parameters"
1417 0 30 if not $explode and $self->openapi_document->oas_version < "3.2"
1420 2 28 unless elem("object", \@types)
1424 0 28 if ref $data ne "Mojo::Parameters"
1428 71 20 if ($$pair[0] =~ /^([^\[]*)\[([^\]]*)\]\z/u)
1430 38 8 if $1 eq $name and !$allowEmptyValue || length $$pair[1]
1435 22 6 keys %$data ? :
1446 0 53 if (my(@missing_values) = grep((!defined($our $_[1])), @pairs))
1454 51 2 if ($explode and @types != 6)
1455 5 46 if (elem("array", \@types))
1456 13 6 $our $_[0] eq $name ? :
1458 5 0 @$data ? :
1461 17 29 if (elem("object", \@types))
1465 17 0 keys %$data ? :
1475 3 28 unless defined $data
1476 28 0 if @types == 6 or coerce_primitive(\$data, \@types)
1483 7 24 !@types ? :
0 31 @types > 1 ? :
24 7 @types ? :
1491 4 163 unless length $content_type
1496 4 159 unless defined $media_type
1503 12 139 unless $content_ref
1516 125 14 if (exists $$media_type_obj{"schema"})
1521 8 131 if (exists $$media_type_obj{"itemSchema"})
1522 2 6 if ref $$content_ref ne "ARRAY"
1530 8 2 unless $self->_evaluate_subschema(\$Deparse error: Unexpected our($$content_ref) [$idx], $$media_type_obj{"itemSchema"}, {%$state, "depth", $$state{"depth"} + 1, "data_path", $$state{"data_path"} . '/' . $idx, "keyword_path", $$state{"keyword_path"} . '/itemSchema'})
1562 30 286 unless ($deserialized_content_ref)
1566 12 6 ref $_ eq 'HASH' ? :
1567 16 14 if $media_type eq "*/*" or CORE::all {ref $_ eq "HASH" ? !keys(%$_) : $_;} $$media_type_obj{"schema"} // (), $$media_type_obj{"itemSchema"} // ()
1570 4 10 if match_media_type($content_type, ["multipart/*"])
1577 2 284 if (match_media_type($content_type, ["application/x-www-form-urlencoded", "multipart/*"]) and my $keyword = &first(sub { exists $$content_obj{$media_type}{$_}; } , "encoding", "prefixEncoding", "itemEncoding"))
1587 0 399 if $is_exception and not @{$$state{"errors"}}
1598 16 383 $is_exception ? :
158 241 !@{$$state{'errors'}} ? :
77 322 $is_response ? :
28 371 $$state{'defaults'} ? :
1607 14 337 unless $schema_info
1611 2 335 if $$state{"depth"}++ > $self->evaluator->max_depth
1614 2 333 if $$schema_info{"document"}->get_entity_at_location($$schema_info{"document_path"}) ne $entity_type
1617 36 297 if $$state{"dynamic_scope"}[-1] ne $scope_uri
1637 0 31 $$state{'vocabularies'}[0] =~ /::OpenAPI_3_0\z/u ? :
31 20 $schema ? :
51 1410 if ref $schema ne "HASH"
1641 0 1410 unless $schema_info
1643 335 1075 if (my $types = ($$schema_info{"document"}{"_type_in_schema"} //= {})->{$$schema_info{"document_path"}})
1648 15 1060 $$state{'specification_version'} eq 'draft4' ? :
1649 4 1071 if (exists $$schema{$id_keyword} and not $$schema{$id_keyword} =~ /^#/u) { }
4 1067 elsif (exists $$schema{'$schema'}) { }
1657 0 4 if $$state{"dynamic_scope"}[-1] ne $$schema_info{"canonical_uri"}
1665 46 1029 if (defined(my $ref = $$schema{"\$ref"}))
1672 8 34 if $$state{"specification_version"} =~ /^draft[467]\z/u
1675 1 1062 if (defined(my $ref = $$schema{"\$dynamicRef"}) and not $$state{"specification_version"} =~ /^draft(?:[467]|2019-09)\z/u)
1688 933 130 if (exists $$schema{'type'}) { }
1690 51 882 ref $$schema{'type'} eq 'ARRAY' ? :
2 931 $$state{'vocabularies'}[0] =~ /::OpenAPI_3_0\z/u && $$schema{'nullable'} ? :
1694 5 125 $$state{'vocabularies'}[0] =~ /::OpenAPI_3_0\z/u ? :
1697 103 960 if exists $$schema{"const"}
1699 8 1055 if exists $$schema{"enum"}
1703 18 1045 if exists $$schema{"allOf"}
1707 1 1062 if exists $$schema{"anyOf"}
1711 1 1062 if exists $$schema{"oneOf"}
1713 5 1058 if (exists $$schema{"not"})
1730 3 245 if ref $data ne "HASH"
1731 0 245 if ref $schema ne "HASH"
1732 31 214 unless keys %$data
1737 12 202 if (defined(my $ref = $$schema{"\$ref"}))
1744 0 12 if $$state{"specification_version"} =~ /^draft[467]\z/u
1747 1 213 if (defined(my $ref = $$schema{"\$dynamicRef"}) and not $$state{"specification_version"} =~ /^draft(?:[467]|2019-09)\z/u)
1752 2 212 if (exists $$schema{"allOf"})
1764 2 586 if ref $$data{$property}
1770 88 498 if exists(($$schema{"properties"} // {})->{$property})
1774 0 586 if exists $$schema{"patternProperties"} and $property =~ /$$schema{"patternProperties"}/u
1778 19 567 if exists $$schema{"additionalProperties"} and @types == 0
1780 107 479 if (@types)
1791 2 586 if ref $$data{$property}
1792 153 433 if (my(@property_coercions) = map(($our $_{$property} // ()), @object_coercions)) { }
4 429 elsif (exists $$schema{'unevaluatedProperties'}) { }
1801 18 196 if delete $$state{"_level"}
1812 3 227 if ref $data ne "ARRAY"
1813 2 225 if ref $schema ne "HASH"
1814 28 197 unless @$data
1819 18 179 if (defined(my $ref = $$schema{"\$ref"}))
1826 0 18 if $$state{"specification_version"} =~ /^draft[467]\z/u
1829 1 196 if (defined(my $ref = $$schema{"\$dynamicRef"}) and not $$state{"specification_version"} =~ /^draft(?:[467]|2019-09)\z/u)
1834 4 193 if (exists $$schema{"allOf"})
1846 2 552 if ref $$data[$idx]
1850 552 0 !($$state{'specification_version'} =~ /^draft(?:[467]|2019-09)\z/u) ? :
1856 80 472 if exists $$schema{$array_items} and $idx <= $$schema{$array_items}->$#*
1860 62 490 if exists $$schema{$schema_items} and @types == 0
1862 142 410 if (@types)
1873 2 552 if ref $$data[$idx]
1874 207 345 if (my(@item_coercions) = map(($our $_[$idx] // ()), @array_coercions)) { }
3 342 elsif (exists $$schema{'unevaluatedItems'}) { }
1883 26 171 if delete $$state{"_level"}
1888 133 333 if defined $final_array_coercions[$idx]
1896 43 562 if (ref $schema ne "HASH")
1897 12 31 if $schema
1900 2 0 $location[-1] eq 'query' ? :
4 2 $location[-3] eq 'header' && $location[-2] eq 'Cookie' ? :
7 6 $location[-2] eq 'header' ? :
4 13 $location[-2] eq 'path' ? :
4 17 $location[-2] eq 'query' ? :
4 21 $location[-1] =~ /^[0-9]+\z/u ? :
6 25 $location[-1] eq 'content' ? :
1912 16 546 unless keys %$schema
1926 0 546 $$state{'stringy_numbers'} ? :
0 546 $$state{'with_defaults'} ? :
1937 62 484 if $$state{"defaults"} and $result->defaults
1944 169 165 if $request->isa("Mojo::Message::Request")
1948 157 8 if ($request->isa('HTTP::Request')) { }
0 8 elsif ($request->isa('Plack::Request') or $request->isa('Catalyst::Request')) { }
1951 157 0 if $request->protocol
1955 61 96 if length $body
1962 0 0 $request->isa('Plack::Request') ? :
1965 0 0 if length $body
1969 0 0 if exists $request->env->{"REQUEST_URI"}
1984 36 36 if $response->isa("Mojo::Message::Response")
1988 35 1 if ($response->isa('HTTP::Response')) { }
0 1 elsif ($response->isa('Plack::Response') or $response->isa('Dancer2::Core::Response')) { }
0 1 elsif ($response->isa('Catalyst::Response')) { }
1990 35 0 if $response->protocol
1993 22 13 if length $body
1999 0 0 if length $body
2006 0 0 if length $body
2028 0 2 unless exists $$self{$attr}