Branch Coverage

blib/lib/JSON/Schema/AsType.pm
Criterion Covered Total %
branch 33 44 75.0


line true false branch
110 0 447 unless ($url =~ m[^\w+://]u)
115 0 0 if (my $p = $self->parent_schema)
124 446 1 if (my $schema = $self->registered_schema($url))
125 446 0 if $schema->has_schema
130 0 1 unless ref $schema eq "HASH"
175 1570 2023 unless eval {
191 403 25 if $new_id =~ m[://]u
206 6702 0 if $_
210 4460 147 @types ? :
222 89042 7241 unless exists $self->schema->{$keyword}
242 16 1974 if ref $ref
245 420 1570 if ($ref =~ s/^([^#]+)//u)
247 382 38 unless ($base =~ m[://]u)
256 681 889 if $ref eq "#"
270 12 964 $is_array ? :
3 973 unless $s = $is_array ? $s->[$ref] : $s->{$ref}
272 960 13 if (ref $s eq "HASH")
273 16 944 if (my $local_id = $s->{'id'} || $s->{'$id'})
284 873 0 ref $s eq 'HASH' || ref $s eq 'JSON::PP::Boolean' ? :
313 0 0 if ref $path
322 0 0 if (my $already = $self->type)
336 4651 3 if $self->has_schema