Branch Coverage

lib/JSV/Compilator.pm
Criterion Covered Total %
branch 90 144 62.5


line true false branch
26 24 0 if ('HASH' eq ref $file) { }
29 0 0 unless -r $file
30 0 0 if ($file =~ /\.yaml$/i or $file =~ /\.yml$/i) { }
0 0 elsif ($file =~ /\.json/i) { }
48 0 0 if (ref $_ eq 'HASH' and exists $_->{'$ref'} and not ref $_->{'$ref'} and keys %$_ == 1)
56 0 0 if ('HASH' eq ref $rp)
94 26 185 if 'HASH' ne ref $shmpt
102 26 42 if (my $class = &blessed($shmpt))
103 26 0 if ($class =~ /bool/i) { }
109 0 42 if ('HASH' ne ref $shmpt)
110 0 0 if &looks_like_number($shmpt)
113 0 42 if $shmpt->{'type'}
119 0 36 if defined $shmpt->{'additionalProperties'} or $shmpt->{'patternProperties'} or $shmpt->{'properties'} or defined $shmpt->{'minProperties'} or defined $shmpt->{'maxProperties'}
125 0 36 if defined $shmpt->{'additionalItems'} or defined $shmpt->{'uniqueItems'} or $shmpt->{'items'} or defined $shmpt->{'minItems'} or defined $shmpt->{'maxItems'}
131 0 32 if defined $shmpt->{'minimum'} or defined $shmpt->{'maximum'} or defined $shmpt->{'exclusiveMinimum'} or defined $shmpt->{'exclusiveMaximum'} or defined $shmpt->{'multipleOf'}
140 77 0 if substr($qs, -1, 1) eq "\n"
161 1 0 $sh ? :
169 0 28 if (defined $schmpt->{'default'})
175 26 2 if (defined $schmpt->{'const'})
177 13 13 $schmpt->{'const'} ? :
181 0 28 if ($self->{'to_json'}) { }
0 28 elsif ($self->{'coersion'}) { }
187 26 2 if ($is_required)
199 0 60 if (defined $schmpt->{'default'})
205 2 58 if (defined $schmpt->{'maxLength'})
209 2 58 if (defined $schmpt->{'minLength'})
213 0 60 if (defined $schmpt->{'const'})
217 6 54 if (defined $schmpt->{'pattern'})
225 10 0 if ($schmpt->{'enum'} and 'ARRAY' eq ref $schmpt->{'enum'} and @{$schmpt->{'enum'};})
230 6 54 if ($schmpt->{'format'} and $formats{$schmpt->{'format'}})
234 0 60 if ($self->{'to_json'} or $self->{'coersion'})
238 32 28 if ($is_required)
251 0 14 if (defined $schmpt->{'default'})
259 5 9 if (defined $schmpt->{'minimum'})
263 1 13 if (defined $schmpt->{'exclusiveMinimum'})
267 3 11 if (defined $schmpt->{'maximum'})
271 0 14 if (defined $schmpt->{'exclusiveMaximum'})
275 0 14 if (defined $schmpt->{'const'})
278 0 14 if ($schmpt->{'multipleOf'})
283 0 0 if ($schmpt->{'enum'} and 'ARRAY' eq ref $schmpt->{'enum'} and @{$schmpt->{'enum'};})
288 0 14 if ($schmpt->{'format'} and $formats{$schmpt->{'format'}})
292 0 14 if ($self->{'to_json'} or $self->{'coersion'})
296 14 0 if ($is_required)
317 5 21 if 'ARRAY' ne ref $schemas
378 26 102 !$path ? :
380 5 123 if defined $schmpt->{'anyOf'}
381 6 122 if defined $schmpt->{'allOf'}
382 10 118 if defined $schmpt->{'oneOf'}
383 5 123 if defined $schmpt->{'not'}
390 6 17 !$path ? :
391 17 6 $path ? :
393 0 23 if ($schmpt->{'default'})
399 21 2 if ($schmpt->{'properties'} and 'HASH' eq ref $schmpt->{'properties'})
401 19 2 if ($schmpt->{'required'} and 'ARRAY' eq ref $schmpt->{'required'})
406 41 0 if ('HASH' eq ref $schmpt->{'properties'}{$k})
414 0 23 if (defined $schmpt->{'minProperties'})
419 0 23 if (defined $schmpt->{'maxProperties'})
425 2 21 if (defined $schmpt->{'patternProperties'})
438 2 0 if ($schmpt->{'properties'} and 'HASH' eq ref $schmpt->{'properties'})
450 10 13 if (defined $schmpt->{'additionalProperties'})
451 10 0 unless (ref $schmpt->{'additionalProperties'} or $schmpt->{'additionalProperties'})
454 10 0 if ($schmpt->{'properties'} and 'HASH' eq ref $schmpt->{'properties'}) { }
458 2 8 if (@pt)
470 23 0 if ($is_required)
481 0 3 !$path ? :
483 0 3 if ($schmpt->{'default'})
489 3 0 if (defined $schmpt->{'minItems'})
493 0 3 if (defined $schmpt->{'maxItems'})
497 3 0 if (defined $schmpt->{'uniqueItems'})
505 3 0 if ($schmpt->{'items'})
514 0 3 if ($is_required)
515 0 0 if $path eq ''