Branch Coverage

blib/lib/JSON/Schema/AsType.pm
Criterion Covered Total %
branch 32 42 76.1


line true false branch
111 0 447 unless ($url =~ m[^\w+://]u)
116 0 0 if (my $p = $self->parent_schema)
125 445 2 if (my $schema = $self->registered_schema($url))
134 0 2 unless ref $schema eq 'HASH'
179 1570 2023 unless eval { do { $self->parent_schema->root_schema } }
195 403 25 if $new_id =~ m[://]u
210 4911 0 if $_
214 3258 99 @types ? :
226 68541 5404 unless exists $self->schema->{$keyword}
246 16 1974 if ref $ref
249 420 1570 if ($ref =~ s/^([^#]+)//u)
251 382 38 unless ($base =~ m[://]u)
260 681 889 if $ref eq '#'
274 12 964 $is_array ? :
3 973 unless $s = $is_array ? $s->[$ref] : $s->{$ref}
276 960 13 if (ref $s eq 'HASH')
277 16 944 if (my $local_id = $s->{'id'} || $s->{'$id'})
288 873 0 ref $s eq 'HASH' || ref $s eq 'JSON::PP::Boolean' ? :
317 0 0 if ref $path
326 0 0 if (my $already = $self->type)
340 3401 3 if $self->has_schema