Branch Coverage

blib/lib/JSON/Schema/Modern/Document.pm
Criterion Covered Total %
branch 40 48 83.3


line true false branch
89 1 18639 if $_[0]{"resource_index"}{$_[1]}
124 42086 0 if $e[$i] eq $entity
134 54 24394 unless exists $self->_entities->{$location}
163 296 17602 $$args{'specification_version'} ? :
69 17829 $$args{'skip_ref_checks'} ? :
167 149 17749 if (@{$$state{"errors"}})
178 1186 891 if $$value{"path"} eq ""
186 16563 1186 unless $seen_root
197 521 2591 unless ($resource)
198 521 0 if $$args{"evaluator"}
199 169 352 unless $resource
205 2628 315 if (not length $fragment or $fragment =~ m[^/]u) { }
311 4 elsif (my $subresource = ($$resource{'anchors'} // {})->{$fragment}) { }
208 4 2624 unless $document->contains($target_path = $$resource{"path"} . ($fragment // ""))
220 46 2889 unless $entity
224 0 2889 if $entity ne $expected_entity
230 44 17704 if @{$$state{"errors"}}
236 0 17897 if ref $self->schema eq "HASH" and exists $self->schema->{"openapi"}
240 1 17896 $self->_has_metaschema_uri ? :
248 0 17897 if $self->original_uri ne $original_uri or builtin::refaddr($self->original_uri) != builtin::refaddr($original_uri)
264 0 3 if builtin::blessed($args[0])
267 3 0 builtin::blessed($class) ? :
276 1 2 if (my($missing_resource) = grep(($_->error =~ /EXCEPTION: unable to find resource/u), $eval_result->errors))
294 0 20 unless exists $$self{$attr}