Condition Coverage

blib/lib/JSON/Schema/Modern.pm
Criterion Covered Total %
condition 161 186 86.5


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 11853 5932 ref $schema_reference eq 'HASH' && exists $$schema_reference{'$schema'}
354 4 0 17937 $valid and not @{$$state{"errors"}}
356 165 17776 0 $valid and @{$$state{"errors"}}
394 63 7 4 ref $schema_reference and not $schema_reference->$JSON::Schema::Modern::_isa("Mojo::URL")
437 7524 9644 0 $valid and @{$$state{"errors"}}
484 0 4 6 ref $schema eq 'HASH' && $$schema{'$schema'}
590 34443 7580 139 $schema_type eq "boolean" and $$state{'specification_version'} ne 'draft4' || $$state{'keyword_path'} =~ m[/(?:additional(?:Items|Properties)|uniqueItems)\z]u
621 3313 51980 1544 $keyword ne "\$ref" and exists $$schema{"\$ref"}
55293 1508 36 $keyword ne "\$ref" and exists $$schema{"\$ref"} and $$state{"specification_version"} =~ /^draft[467]\z/u
658 33153 81 2 $self->strict and keys %unknown_keywords
754 3640 54903 1473 $keyword ne "\$ref" and exists $$schema{"\$ref"}
58543 1442 31 $keyword ne "\$ref" and exists $$schema{"\$ref"} and $$state{"specification_version"} =~ /^draft[467]\z/u
757 58145 1839 1 not $valid and $$state{"short_circuit"}
59984 0 1 not $valid and $$state{"short_circuit"} and $$state{"strict"}
771 6944 4 6213 $$state{"short_circuit"} and not $$state{"strict"}
795 1 0 1 $$state{"short_circuit"} and not $$state{"strict"}
806 33098 197 3 $$state{"strict"} and keys %unknown_keywords
813 33108 31 156 $$state{"seen_data_properties"} and $is_object_data
829 154 0 2 exists $$data{"\$ref"} and $$state{"specification_version"} eq "draft4"
832 12995 18572 1728 $valid and $$state{"collect_annotations"}
31567 759 969 $valid and $$state{"collect_annotations"} and not $$state{"specification_version"} =~ /^draft(?:[467]|2019-09)\z/u
842 12995 20263 37 $valid and $$state{"defaults"}
999 14 83 8 $$schema_info{"schema"}{"\$vocabulary"}{$uri} and not $class_info
1125 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 17937 $$config_override{"traversed_keyword_path"} // ""
302 17410 531 ($$config_override{"specification_version"} // $self->specification_version) // "draft2020-12"
325 1 17940 $$config_override{"callbacks"} // {}
385 1 17386 $$config_override{"data_path"} // ""
1 17386 $$config_override{"traversed_keyword_path"} // ""
423 6 17185 $$config_override{"callbacks"} // {}
433 16801 390 $$state{"collect_annotations"} // 0
456 7 8 $unknown_keywords{$parent} //= []
517 1 1 $fragment // ""
520 1 0 $$resource{"anchors"} // {}
614 202797 552 $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"traverse"} //= [map([$_, $vocabulary->can('_traverse_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))]
685 34800 27 $$state{"dynamic_scope"} // []
747 182640 372 $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"evaluate"} //= [map([$_, $vocabulary->can('_eval_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))]
787 46750 29 $$state{"callbacks"} // {}
867 43843 186 $_[0]{"_resource_index"} // {}
876 25 0 $_[0]{"_resource_index"} // {}
877 17206 187 $_[0]{"_resource_index"} // {}
878 2121 0 $_[0]{"_resource_index"} // {}
1017 41 8 $vocabulary_classes[0] // ""
1112 4979 18616 $fragment // ""
1155 579 1 $$resource{"anchors"} // {}
1236 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 778094 453 0 $_->_checksum // $_->_checksum(md5($self->_json_decoder->encode($_->schema)))
300 17913 28 0 $$config_override{"initial_schema_uri"} // ()
302 298 17112 531 $$config_override{"specification_version"} // $self->specification_version
338 6 17935 0 (ref $schema_reference eq 'HASH' && exists $$schema_reference{'$schema'} ? undef : $$config_override{"metaschema_uri"}) // $self->METASCHEMA_URIS->{$spec_version}
355 17776 165 0 $valid or @{$$state{"errors"}}
419 24 17896 102417 $$config_override{$_} // $self->$_
423 0 9 17182 $$config_override{"with_defaults"} // $self->with_defaults
436 9644 7524 0 $valid or @{$$state{"errors"}}
476 3 26 9611 $$config_override{"collect_annotations"} // $self->collect_annotations
484 0 4 0 $self->specification_version // $self->SPECIFICATION_VERSION_DEFAULT
487 3 2 5 $self->strict || $$config_override{'strict'}
516 1 1 1 not length $fragment or $fragment =~ m[^/]u
590 7575 136 8 $$state{'specification_version'} ne 'draft4' || $$state{'keyword_path'} =~ m[/(?:additional(?:Items|Properties)|uniqueItems)\z]u
608 1684198 203349 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"}))] }
692 406 0 438 $schema || E($state, 'subschema is false')
724 426 1072 31844 ref $data eq 'ARRAY' && exists $$schema{'unevaluatedItems'} || (my $is_object_data = ref $data eq 'HASH') && (exists $$schema{'unevaluatedProperties'} || !!$$state{'seen_data_properties'})
741 1503553 183012 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"}))] }
1111 21472 2123 580 not length $fragment or $fragment =~ m[^/]u

xor 4 conditions

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