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
131 1 2 1 CORE::any {$format eq $_;} @core_formats and $$definition{"type"} ne "string"
256 30 0 826 $$new_resource{"path"} eq "" and not $uri_string =~ /#./u
343 156 11841 5932 ref $schema_reference eq 'HASH' && exists $$schema_reference{'$schema'}
359 4 0 17925 $valid and not @{$$state{"errors"}}
361 165 17764 0 $valid and @{$$state{"errors"}}
399 63 7 4 ref $schema_reference and not $schema_reference->$JSON::Schema::Modern::_isa("Mojo::URL")
442 7506 9650 0 $valid and @{$$state{"errors"}}
489 0 4 6 ref $schema eq 'HASH' && $$schema{'$schema'}
595 34431 7580 139 $schema_type eq "boolean" and $$state{'specification_version'} ne 'draft4' || $$state{'keyword_path'} =~ m[/(?:additional(?:Items|Properties)|uniqueItems)\z]u
626 3313 51968 1544 $keyword ne "\$ref" and exists $$schema{"\$ref"}
55281 1508 36 $keyword ne "\$ref" and exists $$schema{"\$ref"} and $$state{"specification_version"} =~ /^draft[467]\z/u
663 33141 81 2 $self->strict and keys %unknown_keywords
759 3640 54891 1473 $keyword ne "\$ref" and exists $$schema{"\$ref"}
58531 1442 31 $keyword ne "\$ref" and exists $$schema{"\$ref"} and $$state{"specification_version"} =~ /^draft[467]\z/u
762 58133 1839 1 not $valid and $$state{"short_circuit"}
59972 0 1 not $valid and $$state{"short_circuit"} and $$state{"strict"}
776 6935 4 6204 $$state{"short_circuit"} and not $$state{"strict"}
800 1 0 1 $$state{"short_circuit"} and not $$state{"strict"}
811 33086 197 3 $$state{"strict"} and keys %unknown_keywords
818 33096 31 156 $$state{"seen_data_properties"} and $is_object_data
834 154 0 2 exists $$data{"\$ref"} and $$state{"specification_version"} eq "draft4"
837 12977 18578 1728 $valid and $$state{"collect_annotations"}
31555 759 969 $valid and $$state{"collect_annotations"} and not $$state{"specification_version"} =~ /^draft(?:[467]|2019-09)\z/u
847 12977 20269 37 $valid and $$state{"defaults"}
1004 14 83 8 $$schema_info{"schema"}{"\$vocabulary"}{$uri} and not $class_info
1130 0 306 451 length $document_path and $document_path =~ m[^\Q$our $_[1]{"path"}\E(?:/|\z)]u

or 2 conditions

line l !l condition
121 78 878 $$self{"_format_validations"} // {}
124 3 8 $$self{"_format_validations"} // {}
245 169 694 $$doc_resource{"anchors"} // {}
306 4 17925 $$config_override{"traversed_keyword_path"} // ""
307 17398 531 ($$config_override{"specification_version"} // $self->specification_version) // "draft2020-12"
330 1 17928 $$config_override{"callbacks"} // {}
390 1 17374 $$config_override{"data_path"} // ""
1 17374 $$config_override{"traversed_keyword_path"} // ""
428 6 17173 $$config_override{"callbacks"} // {}
438 16789 390 $$state{"collect_annotations"} // 0
461 7 8 $unknown_keywords{$parent} //= []
522 1 1 $fragment // ""
525 1 0 $$resource{"anchors"} // {}
619 202715 552 $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"traverse"} //= [map([$_, $vocabulary->can('_traverse_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))]
690 34788 27 $$state{"dynamic_scope"} // []
752 182590 372 $$vocabulary_cache{$$state{"specification_version"}}{$vocabulary}{"evaluate"} //= [map([$_, $vocabulary->can('_eval_keyword_' . $_ =~ s/^\$//ru)], $vocabulary->keywords($$state{"specification_version"}))]
792 46756 29 $$state{"callbacks"} // {}
872 43820 186 $_[0]{"_resource_index"} // {}
881 25 0 $_[0]{"_resource_index"} // {}
882 17194 187 $_[0]{"_resource_index"} // {}
883 2121 0 $_[0]{"_resource_index"} // {}
1022 41 8 $vocabulary_classes[0] // ""
1117 4979 18604 $fragment // ""
1160 579 1 $$resource{"anchors"} // {}
1241 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
187 721782 454 0 $_->_checksum // $_->_checksum(md5($self->_json_decoder->encode($_->schema)))
305 17901 28 0 $$config_override{"initial_schema_uri"} // ()
307 298 17100 531 $$config_override{"specification_version"} // $self->specification_version
343 6 17923 0 (ref $schema_reference eq 'HASH' && exists $$schema_reference{'$schema'} ? undef : $$config_override{"metaschema_uri"}) // $self->METASCHEMA_URIS->{$spec_version}
360 17764 165 0 $valid or @{$$state{"errors"}}
424 24 17878 102351 $$config_override{$_} // $self->$_
428 0 9 17170 $$config_override{"with_defaults"} // $self->with_defaults
441 9650 7506 0 $valid or @{$$state{"errors"}}
481 3 26 9617 $$config_override{"collect_annotations"} // $self->collect_annotations
489 0 4 0 $self->specification_version // $self->SPECIFICATION_VERSION_DEFAULT
492 3 2 5 $self->strict || $$config_override{'strict'}
521 1 1 1 not length $fragment or $fragment =~ m[^/]u
595 7575 136 8 $$state{'specification_version'} ne 'draft4' || $$state{'keyword_path'} =~ m[/(?:additional(?:Items|Properties)|uniqueItems)\z]u
613 1683514 203267 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"}))] }
697 406 0 438 $schema || E($state, 'subschema is false')
729 426 1072 31832 ref $data eq 'ARRAY' && exists $$schema{'unevaluatedItems'} || (my $is_object_data = ref $data eq 'HASH') && (exists $$schema{'unevaluatedProperties'} || !!$$state{'seen_data_properties'})
746 1503121 182962 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"}))] }
1116 21460 2123 580 not length $fragment or $fragment =~ m[^/]u

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
471 9646 0 0 7549 $valid xor not @{$$state{'errors'}}