Condition Coverage

blib/lib/JSON/Schema/Helper.pm
Criterion Covered Total %
condition 77 164 46.9


and 3 conditions

line !l l&&!r l&&r condition
88 0 0 55 not $_changing and defined $instance
0 0 55 not $_changing and defined $instance and ref $instance eq 'HASH'
0 55 0 not $_changing and defined $instance and ref $instance eq 'HASH' and defined $$instance{'$schema'}
167 153 12 0 ref $schema ne 'HASH' and $path || ref $schema ne 'CODE'
183 153 0 0 $_changing and $$schema{'readonly'}
205 134 0 0 defined $$schema{'disallow'} and not $self->checkType($$schema{'disallow'}, $value, $path, $_changing)
255 7 0 0 $$schema{'minItems'} and scalar @$value < $$schema{'minItems'}
260 7 0 0 $$schema{'maxItems'} and scalar @$value > $$schema{'maxItems'}
281 128 0 0 $$schema{'pattern'} and $self->jsMatchType('string', $value)
287 126 2 0 $$schema{'format'} and $self->jsMatchType('string', $value) || $self->jsMatchType('number', $value)
297 122 0 6 $$schema{'maxLength'} and $self->jsMatchType('string', $value)
122 5 1 $$schema{'maxLength'} and $self->jsMatchType('string', $value) and length $value > $$schema{'maxLength'}
302 116 0 12 $$schema{'minLength'} and $self->jsMatchType('string', $value)
116 10 2 $$schema{'minLength'} and $self->jsMatchType('string', $value) and length $value < $$schema{'minLength'}
307 122 6 0 defined $$schema{'minimum'} and not $self->jsMatchType('number', $value)
309 0 0 0 defined $$schema{'minimumCanEqual'} and not $$schema{'minimumCanEqual'}
323 6 0 0 defined $$schema{'minimumCanEqual'} and not $$schema{'minimumCanEqual'}
335 122 6 0 defined $$schema{'maximum'} and not $self->jsMatchType('number', $value)
337 0 0 0 defined $$schema{'maximumCanEqual'} and not $$schema{'maximumCanEqual'}
351 6 0 0 defined $$schema{'maximumCanEqual'} and not $$schema{'maximumCanEqual'}
371 128 0 0 $$schema{'divisibleBy'} and $self->jsMatchType('number', $value)
128 0 0 $$schema{'maxDecimal'} and $self->jsMatchType('number', $value)
424 1 17 57 defined $objTypeDef && defined $$objTypeDef{$i}
425 0 33 33 !$additionalProp && !$patternProp && defined $additionalProp
435 18 57 0 $objTypeDef && $$objTypeDef{$i} && $$objTypeDef{$i}{'requires'}
436 75 0 0 defined $requires and not defined $$instance{$requires}
441 18 57 0 $objTypeDef && $$objTypeDef{$i} && $$objTypeDef{$i}{'dependencies'}
448 1 0 74 defined $objTypeDef and ref $objTypeDef eq 'HASH'
1 57 17 defined $objTypeDef and ref $objTypeDef eq 'HASH' and not defined $$objTypeDef{$i}
464 0 0 75 not $_changing and defined $value
0 68 7 not $_changing and defined $value and ref $value eq 'HASH'
68 7 0 not $_changing and defined $value and ref $value eq 'HASH' and defined $$value{'$schema'}
476 146 0 18 &blessed($value) and $value->isa('JSON::Schema::Null')
492 0 1 12 $value =~ /^\-?[0-9]*(\.[0-9]*)?$/ && length $value
503 6 0 0 ref $value eq 'SCALAR' and $$value == 0 || $$value == 1
536 0 0 0 &blessed($value) and $value->isa($type)
0 0 0 ref $value and ref $value eq $type
558 29 0 0 ref $value eq 'SCALAR' and $$value == 0
29 0 0 ref $value eq 'SCALAR' and $$value == 0 and $$value == 1

or 2 conditions

line l !l condition
41 0 55 $args{'errors'} //= []
42 55 0 $args{'format'} //= {}
67 0 0 $property //= 'property'
86 55 0 $_changing // ''

or 3 conditions

line l !l&&r !l&&!r condition
40 0 55 0 $args{'hyper'} //= 'JSON::Hyper'->new
167 12 0 0 $path || ref $schema ne 'CODE'
213 69 1 51 defined $$schema{'properties'} or defined $$schema{'additionalProperties'}
70 0 51 defined $$schema{'properties'} or defined $$schema{'additionalProperties'} or defined $$schema{'patternProperties'}
1 0 51 defined $$schema{'properties'} or defined $$schema{'additionalProperties'} or defined $$schema{'patternProperties'} or $$schema{'type'} eq 'object'
287 2 0 0 $self->jsMatchType('string', $value) || $self->jsMatchType('number', $value)
309 0 0 0 defined $$schema{'minimumCanEqual'} and not $$schema{'minimumCanEqual'} or $$schema{'exclusiveMinimum'}
323 0 0 6 defined $$schema{'minimumCanEqual'} and not $$schema{'minimumCanEqual'} or $$schema{'exclusiveMinimum'}
337 0 0 0 defined $$schema{'maximumCanEqual'} and not $$schema{'maximumCanEqual'} or $$schema{'exclusiveMaximum'}
351 0 0 6 defined $$schema{'maximumCanEqual'} and not $$schema{'maximumCanEqual'} or $$schema{'exclusiveMaximum'}
429 0 57 18 $prop_is_hidden or $prop_is_explicitly_allowed
57 12 6 $prop_is_hidden or $prop_is_explicitly_allowed or $prop_is_implicitly_allowed
503 0 0 0 $$value == 0 || $$value == 1