Condition Coverage

blib/lib/JSON/Schema/Modern.pm
Criterion Covered Total %
condition 162 186 87.1


and 3 conditions

line !l l&&!r l&&r condition
126 1 2 1 core_formats_type()->check($format) and $$definition{"type"} ne "string"
251 30 0 826 $$new_resource{"path"} eq "" and not $uri_string =~ /#./u
338 156 11855 5932 ref $schema_reference eq 'HASH' && exists $$schema_reference{'$schema'}
354 4 0 17939 $valid and not @{$$state{"errors"}}
356 165 17778 0 $valid and @{$$state{"errors"}}
396 64 7 4 ref $schema_reference and not $schema_reference->$JSON::Schema::Modern::_isa("Mojo::URL")
439 7524 9647 0 $valid and @{$$state{"errors"}}
487 0 4 6 ref $schema eq 'HASH' && $$schema{'$schema'}
593 34454 7579 139 $schema_type eq "boolean" and $$state{'specification_version'} ne 'draft4' || $$state{'keyword_path'} =~ m[/(?:additional(?:Items|Properties)|uniqueItems)\z]u
624 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
661 33163 81 2 $self->strict and keys %unknown_keywords
757 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
760 58165 1840 1 not $valid and $$state{"short_circuit"}
60005 0 1 not $valid and $$state{"short_circuit"} and $$state{"strict"}
774 6944 4 6213 $$state{"short_circuit"} and not $$state{"strict"}
798 1 0 1 $$state{"short_circuit"} and not $$state{"strict"}
809 33104 197 3 $$state{"strict"} and keys %unknown_keywords
816 33114 31 156 $$state{"seen_data_properties"} and $is_object_data
832 154 0 2 exists $$data{"\$ref"} and $$state{"specification_version"} eq "draft4"
835 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
845 12995 20265 41 $valid and $$state{"defaults"}
1002 14 83 8 $$schema_info{"schema"}{"\$vocabulary"}{$uri} and not $class_info
1128 0 306 451 length $document_path and $document_path =~ m[^\Q$our $_[1]{"path"}\E(?:/|\z)]u

or 2 conditions

line l !l condition
116 78 890 $$self{"_format_validations"} // {}
119 3 8 $$self{"_format_validations"} // {}
240 169 694 $$doc_resource{"anchors"} // {}
301 4 17939 $$config_override{"traversed_keyword_path"} // ""
302 17410 533 ($$config_override{"specification_version"} // $self->specification_version) // "draft2020-12"
325 1 17942 $$config_override{"callbacks"} // {}
385 2 17388 $$config_override{"data_path"} // ""
2 17388 $$config_override{"traversed_keyword_path"} // ""
425 8 17186 $$config_override{"callbacks"} // {}
435 16801 393 $$state{"collect_annotations"} // 0
458 7 8 $unknown_keywords{$parent} //= []
520 1 1 $fragment // ""
523 1 0 $$resource{"anchors"} // {}
617 202867 552 $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"traverse"} //= [map([$_, $vocabulary->can('_traverse_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))]
688 34807 27 $$state{"dynamic_scope"} // []
750 182682 372 $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"evaluate"} //= [map([$_, $vocabulary->can('_eval_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))]
790 46771 29 $$state{"callbacks"} // {}
870 43848 187 $_[0]{"_resource_index"} // {}
879 25 0 $_[0]{"_resource_index"} // {}
880 17207 188 $_[0]{"_resource_index"} // {}
881 2123 0 $_[0]{"_resource_index"} // {}
1020 41 8 $vocabulary_classes[0] // ""
1115 4981 18618 $fragment // ""
1158 579 1 $$resource{"anchors"} // {}
1239 6 3 &first(sub { fc($type) =~ m[^\Q$1\E/[^/]+\z]u if m[([^/]+)/\*\z]u; } , keys %$types) // "*/*"

or 3 conditions

line l !l&&r !l&&!r condition
182 684219 451 0 $_->_checksum // $_->_checksum(md5($self->_json_decoder->encode($_->schema)))
300 17915 28 0 $$config_override{"initial_schema_uri"} // ()
302 298 17112 533 $$config_override{"specification_version"} // $self->specification_version
338 6 17937 0 (ref $schema_reference eq 'HASH' && exists $$schema_reference{'$schema'} ? undef : $$config_override{"metaschema_uri"}) // $self->METASCHEMA_URIS->{$spec_version}
355 17778 165 0 $valid or @{$$state{"errors"}}
421 25 17896 102437 $$config_override{$_} // $self->$_
425 1 9 17184 $$config_override{"with_defaults"} // $self->with_defaults
438 9647 7524 0 $valid or @{$$state{"errors"}}
480 3 26 9614 $$config_override{"collect_annotations"} // $self->collect_annotations
487 0 4 0 $self->specification_version // $self->SPECIFICATION_VERSION_DEFAULT
490 3 2 5 $self->strict || $$config_override{'strict'}
519 1 1 1 not length $fragment or $fragment =~ m[^/]u
593 7574 136 8 $$state{'specification_version'} ne 'draft4' || $$state{'keyword_path'} =~ m[/(?:additional(?:Items|Properties)|uniqueItems)\z]u
611 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"}))] }
695 406 0 438 $schema || E($state, 'subschema is false')
727 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'})
744 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"}))] }
1114 21474 2125 580 not length $fragment or $fragment =~ m[^/]u

xor 4 conditions

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