Branch Coverage

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


line true false branch
111 0 225 unless ($url =~ m[^\w+://]u)
116 0 0 if (my $p = $self->parent_schema)
125 223 2 if (my $schema = $self->registered_schema($url))
134 0 2 unless ref $schema eq 'HASH'
179 1316 1974 unless eval { do { $self->parent_schema->root_schema } }
195 207 12 if $new_id =~ m[://]u
210 3709 0 if $_
214 2471 83 @types ? :
226 50513 3987 unless exists $self->schema->{$keyword}
246 6 1518 if ref $ref
249 208 1316 if ($ref =~ s/^([^#]+)//u)
251 186 22 unless ($base =~ m[://]u)
260 661 655 if $ref eq '#'
274 12 895 $is_array ? :
3 904 unless $s = $is_array ? $s->[$ref] : $s->{$ref}
276 891 13 if (ref $s eq 'HASH')
277 6 885 if (my $local_id = $s->{'id'} || $s->{'$id'})
288 649 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 2560 3 if $self->has_schema