Condition Coverage

blib/lib/JSON/Schema/Modern/Utilities.pm
Criterion Covered Total %
condition 120 141 85.1


and 2 conditions

line l !l condition
246 1632 969 $x eq $y && (return 1)
248 689 863 $x == $y && (return 1)

and 3 conditions

line !l l&&!r l&&r condition
113 907 3 29376 !(length ref $value || builtin::is_bool($value)) && $flags & 1024 && (!($flags & 768) || do { BEGIN {${^WARNING_BITS} = "\xdd\x7f\xf7\xc3\xd7\xff\xf5\xff\xff\xff\xff\xff\xf5\xd7\xf4\xd7\x15\x51\x55\x55\x55\x55\x55"} 0 + $value eq $value })
140 0 0 11 !builtin::blessed($value) && ref $value eq $1
160 53 267 327 !$$config{'legacy_ints'} && $value->is_int
176 6681 8659 135 $flags & 1024 and !($flags & 768) || do { BEGIN {${^WARNING_BITS} = "\xdd\x7f\xf7\xc3\xd7\xff\xf5\xff\xff\xff\xff\xff\xf5\xd7\xf4\xd7\x15\x51\x55\x55\x55\x55\x55"} 0 + $value eq $value }
181 3 0 313 $flags & 256 && !($flags & 512)
200 25660 39979 0 not !builtin::blessed($value) and $value->isa('JSON::PP::Boolean') || $value->isa('Cpanel::JSON::XS::Boolean') || $value->isa('JSON::XS::Boolean')
237 5 3 8 $types[0] eq "string" and &looks_like_number($x)
240 8 3 5 $types[1] eq "string" and &looks_like_number($y)
305 37045 10921 0 length $_[0] and substr($_[0], 0, 1) ne "/"
311 0 0 0 length $_[0] and substr($_[0], 0, 1) ne "/"
325 3 1 2 ref $data eq "HASH" and ref $value ne "HASH"
1 1 2 ref $data eq "ARRAY" and ref $value ne "ARRAY"
339 0 7 22 @keys >= 2 and not $keys[1] =~ /^\d+\z/a
7 21 1 @keys >= 2 and not $keys[1] =~ /^\d+\z/a and ref $data eq "ARRAY"
28 0 1 @keys >= 2 and not $keys[1] =~ /^\d+\z/a and ref $data eq "ARRAY" and not defined wantarray
347 27 9 2 ref $$curp eq "ARRAY" and not $key =~ /^\d+\z/a
400 35 11 68 not $document and my $filename = get_schema_filename($uri)
477 13448 505 1 defined $sps && ref $sps eq 'ARRAY'
582 2853 404 2621 $string =~ /#/u and not $string =~ /#\z/u
3257 504 2117 $string =~ /#/u and not $string =~ /#\z/u and not $string =~ /#[A-Za-z_][A-Za-z0-9_:.-]*\z/u
908 2091 26 $string =~ /#/u and not $string =~ /#\z/u and not $string =~ /#[A-Za-z_][A-Za-z0-9_:.-]*\z/u and not $string =~ m[#/(?:[^~]|~[01])*\z]u
600 6140 42 1 $string =~ /#/u and not $string =~ /#\z/u
6182 0 1 $string =~ /#/u and not $string =~ /#\z/u and not $string =~ /#[A-Za-z][A-Za-z0-9_:.-]*\z/u
42 1 0 $string =~ /#/u and not $string =~ /#\z/u and not $string =~ /#[A-Za-z][A-Za-z0-9_:.-]*\z/u and not $string =~ m[#/(?:[^~]|~[01])*\z]u

or 2 conditions

line l !l condition
224 1993 4461 $$state{"path"} //= ""
451 1149 11647 $uri->fragment // ""
497 13954 0 $$state{"depth"} // 0
535 2638 0 $$state{"depth"} // 0

or 3 conditions

line l !l&&r !l&&!r condition
98 30302 8050 3937 $type eq "string" or $type eq "number"
38352 3921 16 $type eq "string" or $type eq "number" or $type eq "integer"
118 683 6111 1254 is_bignum($value) || &created_as_number($value)
125 2 6 9 ref $value eq 'Math::BigInt' || $flags & 256 && !($flags & 512) && &created_as_number($value)
132 130 3717 55 is_bignum($value) && $value->is_int || &created_as_number($value) && int $value == $value
176 8771 8 15 !($flags & 768) || do { BEGIN {${^WARNING_BITS} = "\xdd\x7f\xf7\xc3\xd7\xff\xf5\xff\xff\xff\xff\xff\xf5\xd7\xf4\xd7\x15\x51\x55\x55\x55\x55\x55"} 0 + $value eq $value }
200 15062 0 24917 $value->isa('JSON::PP::Boolean') || $value->isa('Cpanel::JSON::XS::Boolean') || $value->isa('JSON::XS::Boolean')
325 2 2 2 ref $data eq "HASH" and ref $value ne "HASH" or ref $data eq "ARRAY" and ref $value ne "ARRAY"
347 23 7 31 not ref $$curp or ref $$curp eq "ARRAY" and not $key =~ /^\d+\z/a
355 27 15 19 ref $$curp eq 'HASH' || !($key =~ /^\d+\z/a)
449 0 12796 21443 @extra_path or length $$state{"keyword_path"}
477 505 2859 10589 $sps // ()
481 13462 368 124 $$state{"keyword"} // ()
582 8 0 5878 fc "Mojo::URL"->new($string)->to_unsafe_string ne fc $string or $string =~ /[^[:ascii:]]/u
8 142 5736 fc "Mojo::URL"->new($string)->to_unsafe_string ne fc $string or $string =~ /[^[:ascii:]]/u or $string =~ /#/u and not $string =~ /#\z/u and not $string =~ /#[A-Za-z_][A-Za-z0-9_:.-]*\z/u and not $string =~ m[#/(?:[^~]|~[01])*\z]u
597 6199 0 0 $override // $$schema{$$state{"keyword"}}
600 8 0 6191 fc $uri->to_unsafe_string ne fc $string or $string =~ /[^[:ascii:]]/u
8 8 6183 fc $uri->to_unsafe_string ne fc $string or $string =~ /[^[:ascii:]]/u or not $uri->is_abs
8 0 6183 fc $uri->to_unsafe_string ne fc $string or $string =~ /[^[:ascii:]]/u or not $uri->is_abs or $string =~ /#/u and not $string =~ /#\z/u and not $string =~ /#[A-Za-z][A-Za-z0-9_:.-]*\z/u and not $string =~ m[#/(?:[^~]|~[01])*\z]u