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 445 2 if (my $schema = $self->registered_schema($url))
125 445 0 if $schema->has_schema
130 0 2 unless ref $schema eq 'HASH'
175 1570 2023 unless eval { do { $self->parent_schema->root_schema } }
191 403 25 if $new_id =~ m[://]u
206 4911 0 if $_
210 3258 99 @types ? :
222 68541 5404 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 3401 3 if $self->has_schema