Branch Coverage

blib/lib/JSON/Schema/Modern/Vocabulary/Core.pm
Criterion Covered Total %
branch 91 102 89.2


line true false branch
32 72 17 $spec_version ne 'draft7' ? :
27 62 $spec_version eq 'draft2019-09' ? :
45 44 $spec_version eq 'draft2020-12' ? :
27 62 $spec_version eq 'draft2019-09' ? :
45 44 $spec_version eq 'draft2020-12' ? :
17 72 $spec_version eq 'draft7' ? :
49 2 1655 unless assert_keyword_type($state, $schema, "string") and assert_uri_reference($state, $schema)
54 312 1343 if ($state->{'spec_version'} eq 'draft7') { }
55 30 282 if (length $uri->fragment)
56 0 30 if length $uri->clone->fragment(undef)
63 2 1341 if length $uri->fragment
68 24 1599 unless length $uri
70 1031 568 $uri->is_abs ? :
89 0 2887 unless $schema_info
98 251 2636 if ($state->{'validate_formats'})
112 1 5560 unless assert_keyword_type($state, $schema, "string") and assert_uri($state, $schema)
119 3 5557 if length $state->{'schema_path'}
123 5513 44 if (my $metaschema_info = $state->{'evaluator'}->_get_metaschema_vocabulary_classes($schema->{'$schema'})) { }
128 1 43 unless $schema_info
136 17 5539 unless @$vocabularies
140 1 5538 if exists $schema->{'$ref'} and $spec_version eq "draft7"
145 552 4986 if (@{$state->{'identifiers'}})
153 0 451 unless assert_keyword_type($state, $schema, "string")
160 0 4 $state->{'keyword'} eq '$id' ? :
4 447 if $state->{'spec_version'} =~ /^draft(?:7|2019-09)$/u and not $$schema{$state->{'keyword'}} =~ /^[A-Za-z][A-Za-z0-9_:.-]*$/u or $state->{'spec_version'} eq "draft2020-12" and not $$schema{$state->{'keyword'}} =~ /^[A-Za-z_][A-Za-z0-9._-]*$/u
179 0 131 unless assert_keyword_type($state, $schema, "boolean")
184 3 128 if length $state->{'schema_path'}
189 587 97 if not $schema->{'$recursiveAnchor'} or exists $state->{'recursive_anchor_uri'}
203 28 2911 unless assert_keyword_type($state, $schema, "string") and assert_uri_reference($state, $schema)
218 0 123 unless $schema_info
220 82 24 if (is_type("boolean", $schema_info->{'schema'}{'$recursiveAnchor'}) and $schema_info->{'schema'}{'$recursiveAnchor'})
233 0 207 unless $schema_info
237 177 25 if (length $uri->fragment and exists $schema_info->{'schema'}{'$dynamicAnchor'} and $uri->fragment eq (my $anchor = $schema_info->{'schema'}{'$dynamicAnchor'}))
245 168 111 if (($dynamic_anchor_subschema_info->{'schema'}{'$dynamicAnchor'} // "") eq $anchor)
256 0 138 unless assert_keyword_type($state, $schema, "object")
259 1 137 if length $state->{'schema_path'}
265 3 262 unless assert_keyword_type({%$state, "_schema_path_suffix", $uri}, $schema, "boolean")
266 7 255 unless assert_uri({%$state, "_schema_path_suffix", $uri}, undef, $uri)
285 0 442 unless assert_keyword_type($state, $schema, "string")
300 2 41 unless (exists $schema_info->{'schema'}{'$vocabulary'})
308 1 40 if length $schema_info->{'document_path'}
309 1 40 unless exists $schema_info->{'schema'}{'$id'}
311 2 39 unless $valid
318 8 70 if $schema_info->{'schema'}{'$vocabulary'}{$uri} and not $class_info
320 8 62 unless $class_info
325 5 57 if $spec_version ne $schema_info->{'specification_version'}
331 0 1 $a->evaluation_order == 999 ? :
0 26 unless $a->evaluation_order <=> $b->evaluation_order
336 9 30 if ($vocabulary_classes[0] // "") ne "JSON::Schema::Modern::Vocabulary::Core"
340 24 15 if $valid
342 24 15 $valid ? :