Branch Coverage

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


line true false branch
88 1 18653 if $_[0]{"resource_index"}{$_[1]}
123 42108 0 if $e[$i] eq $entity
133 54 24410 unless exists $self->_entities->{$location}
162 296 17616 $$args{'specification_version'} ? :
69 17843 $$args{'skip_ref_checks'} ? :
166 149 17763 if (@{$$state{"errors"}})
177 1186 891 if $$value{"path"} eq ""
185 16577 1186 unless $seen_root
196 521 2591 unless ($resource)
197 521 0 if $$args{"evaluator"}
198 169 352 unless $resource
204 2628 315 if (not length $fragment or $fragment =~ m[^/]u) { }
311 4 elsif (my $subresource = ($$resource{'anchors'} // {})->{$fragment}) { }
207 4 2624 unless $document->contains($target_path = $$resource{"path"} . ($fragment // ""))
219 46 2889 unless $entity
223 0 2889 if $entity ne $expected_entity
229 44 17718 if @{$$state{"errors"}}
235 0 17911 if ref $self->schema eq "HASH" and exists $self->schema->{"openapi"}
239 1 17910 $self->_has_metaschema_uri ? :
247 0 17911 if $self->original_uri ne $original_uri or builtin::refaddr($self->original_uri) != builtin::refaddr($original_uri)
263 0 3 if builtin::blessed($args[0])
266 3 0 builtin::blessed($class) ? :
275 1 2 if (my($missing_resource) = grep(($_->error =~ /EXCEPTION: unable to find resource/u), $eval_result->errors))
293 0 20 unless exists $$self{$attr}