Condition Coverage

blib/lib/JSON/Schema/Modern.pm
Criterion Covered Total %
condition 160 184 86.9


and 3 conditions

line !l l&&!r l&&r condition
130 1 2 1 core_formats_type()->check($format) and $$definition{"type"} ne "string"
259 30 0 826 $$new_resource{"path"} eq "" and not $uri_string =~ /#./u
346 156 11855 5932 ref $schema_reference eq 'HASH' && exists $$schema_reference{'$schema'}
362 4 0 17939 $valid and not @{$$state{"errors"}}
364 165 17778 0 $valid and @{$$state{"errors"}}
404 64 7 4 ref $schema_reference and not $schema_reference->$_isa("Mojo::URL")
447 7524 9647 0 $valid and @{$$state{"errors"}}
495 0 4 6 ref $schema eq 'HASH' && $$schema{'$schema'}
601 34454 7579 139 $schema_type eq "boolean" and $$state{'specification_version'} ne 'draft4' || $$state{'keyword_path'} =~ m[/(?:additional(?:Items|Properties)|uniqueItems)\z]u
632 3313 52015 1544 $keyword ne "\$ref" and exists $$schema{"\$ref"}
55328 1508 36 $keyword ne "\$ref" and exists $$schema{"\$ref"} and $$state{"specification_version"} =~ /^draft[467]\z/u
669 33163 81 2 $self->strict and keys %unknown_keywords
765 3641 54923 1473 $keyword ne "\$ref" and exists $$schema{"\$ref"}
58564 1442 31 $keyword ne "\$ref" and exists $$schema{"\$ref"} and $$state{"specification_version"} =~ /^draft[467]\z/u
768 58165 1840 1 not $valid and $$state{"short_circuit"}
60005 0 1 not $valid and $$state{"short_circuit"} and $$state{"strict"}
782 6944 4 6213 $$state{"short_circuit"} and not $$state{"strict"}
806 1 0 1 $$state{"short_circuit"} and not $$state{"strict"}
817 33104 197 3 $$state{"strict"} and keys %unknown_keywords
824 33114 31 156 $$state{"seen_data_properties"} and $is_object_data
840 154 0 2 exists $$data{"\$ref"} and $$state{"specification_version"} eq "draft4"
843 12995 18578 1728 $valid and $$state{"collect_annotations"}
31573 759 969 $valid and $$state{"collect_annotations"} and not $$state{"specification_version"} =~ /^draft(?:[467]|2019-09)\z/u
853 12995 20265 41 $valid and $$state{"defaults"}
1010 14 83 8 $$schema_info{"schema"}{"\$vocabulary"}{$uri} and not $class_info
1136 0 306 451 length $document_path and $document_path =~ m[^\Q$our $_[1]{"path"}\E(?:/|\z)]u

or 2 conditions

line l !l condition
120 78 890 $$self{"_format_validations"} // {}
123 3 8 $$self{"_format_validations"} // {}
248 169 694 $$doc_resource{"anchors"} // {}
309 4 17939 $$config_override{"traversed_keyword_path"} // ""
310 17410 533 ($$config_override{"specification_version"} // $self->specification_version) // "draft2020-12"
333 1 17942 $$config_override{"callbacks"} // {}
393 2 17388 $$config_override{"data_path"} // ""
2 17388 $$config_override{"traversed_keyword_path"} // ""
433 8 17186 $$config_override{"callbacks"} // {}
443 16801 393 $$state{"collect_annotations"} // 0
466 7 8 $unknown_keywords{$parent} //= []
528 1 1 $fragment // ""
531 1 0 $$resource{"anchors"} // {}
625 202867 552 $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"traverse"} //= [map([$_, $vocabulary->can('_traverse_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))]
696 34807 27 $$state{"dynamic_scope"} // []
758 182682 372 $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"evaluate"} //= [map([$_, $vocabulary->can('_eval_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))]
798 46771 29 $$state{"callbacks"} // {}
878 43850 187 $_[0]{"_resource_index"} // {}
887 25 0 $_[0]{"_resource_index"} // {}
888 17207 188 $_[0]{"_resource_index"} // {}
889 2123 0 $_[0]{"_resource_index"} // {}
1028 41 8 $vocabulary_classes[0] // ""
1123 4981 18618 $fragment // ""
1166 579 1 $$resource{"anchors"} // {}

or 3 conditions

line l !l&&r !l&&!r condition
190 717552 456 0 $_->_checksum // $_->_checksum(md5($self->_json_decoder->encode($_->schema)))
308 17915 28 0 $$config_override{"initial_schema_uri"} // ()
310 298 17112 533 $$config_override{"specification_version"} // $self->specification_version
346 6 17937 0 (ref $schema_reference eq 'HASH' && exists $$schema_reference{'$schema'} ? undef : $$config_override{"metaschema_uri"}) // $self->METASCHEMA_URIS->{$spec_version}
363 17778 165 0 $valid or @{$$state{"errors"}}
429 25 17896 102437 $$config_override{$_} // $self->$_
433 1 9 17184 $$config_override{"with_defaults"} // $self->with_defaults
446 9647 7524 0 $valid or @{$$state{"errors"}}
488 3 26 9614 $$config_override{"collect_annotations"} // $self->collect_annotations
495 0 4 0 $self->specification_version // $self->SPECIFICATION_VERSION_DEFAULT
498 3 2 5 $self->strict || $$config_override{'strict'}
527 1 1 1 not length $fragment or $fragment =~ m[^/]u
601 7574 136 8 $$state{'specification_version'} ne 'draft4' || $$state{'keyword_path'} =~ m[/(?:additional(?:Items|Properties)|uniqueItems)\z]u
619 1684768 203419 0 $keyword_list //= do { BEGIN { $^H{'autovivification'} = '194'; } $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"traverse"} //= [map([$_, $vocabulary->can('_traverse_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))] }
703 406 0 438 $schema || E($state, 'subschema is false')
735 426 1072 31850 ref $data eq 'ARRAY' && exists $$schema{'unevaluatedItems'} || (my $is_object_data = ref $data eq 'HASH') && (exists $$schema{'unevaluatedProperties'} || !!$$state{'seen_data_properties'})
752 1503895 183054 0 $keyword_list //= do { BEGIN { $^H{'autovivification'} = '194'; } $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"evaluate"} //= [map([$_, $vocabulary->can('_eval_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))] }
1122 21474 2125 580 not length $fragment or $fragment =~ m[^/]u

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
476 9643 0 0 7567 $valid xor not @{$$state{'errors'}}