Condition Coverage

blib/lib/JSON/Schema/Modern/Utilities.pm
Criterion Covered Total %
condition 117 138 84.7


and 2 conditions

line l !l condition
247 1632 7617 $x eq $y && (return 1)
249 690 1398 $x == $y && (return 1)

and 3 conditions

line !l l&&!r l&&r condition
115 907 3 29397 !(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 })
142 0 0 11 !builtin::blessed($value) && ref $value eq $1
161 53 267 327 !$$config{'legacy_ints'} && $value->is_int
177 6889 21963 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 }
182 3 0 313 $flags & 256 && !($flags & 512)
201 42700 40844 0 not !builtin::blessed($value) and $value->isa('JSON::PP::Boolean') || $value->isa('Cpanel::JSON::XS::Boolean') || $value->isa('JSON::XS::Boolean')
238 5 3 8 $types[0] eq "string" and &looks_like_number($x)
241 8 3 5 $types[1] eq "string" and &looks_like_number($y)
306 37798 13782 0 length $_[0] and substr($_[0], 0, 1) ne "/"
312 0 0 0 length $_[0] and substr($_[0], 0, 1) ne "/"
348 0 9 47 @keys >= 2 and not $keys[1] =~ /^(?:\d+|-)\z/a
9 46 1 @keys >= 2 and not $keys[1] =~ /^(?:\d+|-)\z/a and ref $data eq "ARRAY"
55 0 1 @keys >= 2 and not $keys[1] =~ /^(?:\d+|-)\z/a and ref $data eq "ARRAY" and not defined wantarray
356 53 15 2 ref $$curp eq "ARRAY" and not $key =~ /^(?:\d+|-)\z/a
411 35 11 68 not $document and my $filename = get_schema_filename($uri)
488 13448 505 1 defined $sps && ref $sps eq 'ARRAY'
593 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
611 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
225 10398 6360 $$state{"path"} //= ""
462 1150 11649 $uri->fragment // ""
508 13954 0 $$state{"depth"} // 0
546 2638 0 $$state{"depth"} // 0

or 3 conditions

line l !l&&r !l&&!r condition
100 30323 8050 3937 $type eq "string" or $type eq "number"
38373 3921 16 $type eq "string" or $type eq "number" or $type eq "integer"
120 683 6111 1254 is_bignum($value) || &created_as_number($value)
127 2 6 9 ref $value eq 'Math::BigInt' || $flags & 256 && !($flags & 512) && &created_as_number($value)
134 130 3717 55 is_bignum($value) && $value->is_int || &created_as_number($value) && int $value == $value
177 22075 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 }
201 15924 0 24920 $value->isa('JSON::PP::Boolean') || $value->isa('Cpanel::JSON::XS::Boolean') || $value->isa('JSON::XS::Boolean')
323 58 17410 2 grep((ref $data eq $_), ("HASH", "ARRAY")) or defined wantarray
328 17406 4 2 not ref $data or ref $data ne ref $value
356 43 7 63 not ref $$curp or ref $$curp eq "ARRAY" and not $key =~ /^(?:\d+|-)\z/a
364 53 33 27 ref $$curp eq 'HASH' || !($key =~ /^(?:\d+|-)\z/a)
460 0 12799 21446 @extra_path or length $$state{"keyword_path"}
488 505 2859 10589 $sps // ()
492 13462 368 124 $$state{"keyword"} // ()
593 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
608 6199 0 0 $override // $$schema{$$state{"keyword"}}
611 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