Condition Coverage

blib/lib/JSON/Schema/Modern/Utilities.pm
Criterion Covered Total %
condition 154 185 83.2


and 2 conditions

line l !l condition
265 1637 7858 $x eq $y && (return 1)
267 690 1416 $x == $y && (return 1)

and 3 conditions

line !l l&&!r l&&r condition
133 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\x15\x55\x55\x55"} 0 + $value eq $value })
160 0 0 11 !builtin::blessed($value) && ref $value eq $1
179 53 267 327 !$$config{'legacy_ints'} && $value->is_int
195 6925 22455 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\x15\x55\x55\x55"} 0 + $value eq $value }
200 3 0 313 $flags & 256 && !($flags & 512)
219 43315 16781 0 not !builtin::blessed($value) and $value->isa('JSON::PP::Boolean') || $value->isa('Cpanel::JSON::XS::Boolean') || $value->isa('JSON::XS::Boolean')
256 5 3 8 $types[0] eq "string" and &looks_like_number($x)
259 8 3 5 $types[1] eq "string" and &looks_like_number($y)
324 37875 13787 0 length $_[0] and substr($_[0], 0, 1) ne "/"
330 0 0 0 length $_[0] and substr($_[0], 0, 1) ne "/"
378 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
386 53 15 2 ref $$curp eq "ARRAY" and not $key =~ /^(?:\d+|-)\z/a
441 35 11 68 not $document and my $filename = get_schema_filename($uri)
502 2 0 207 defined $type and defined $subtype
616 10 6 0 defined $decoder_sub and ref $decoder_sub ne "CODE"
617 16 0 0 defined $encoder_sub and ref $encoder_sub ne "CODE"
650 0 2 0 $_ != 1 && $_ != $caller_addr
673 5 3 0 ref $content_ref ne "REF" and ref $content_ref ne "SCALAR"
694 75 11 2 @$media_types and CORE::any {$_ eq $media_type_string;} @$media_types
11 39 36 not @$media_types and exists $$MEDIA_TYPES{$media_type_string}
719 299 57 35 $$types{$candidate}{"subtype"} eq "*" and $$types{$candidate}{"type"} eq $$mt{"type"}
728 50 4 2 $$mt{"subtype"} =~ /^.+\+(.+)\z/u and $$types{$candidate}{"subtype"} eq $1
779 13448 505 1 defined $sps && ref $sps eq 'ARRAY'
884 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
902 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
243 10688 6620 $$state{"path"} //= ""
501 209 0 $type_subtype // ""
650 3 2 $caller_addr == 1 or $$MEDIA_TYPES{$media_type_string}{"caller_addr"} = [grep(($_ != 1 && $_ != $caller_addr), @{$$MEDIA_TYPES{$media_type_string}{"caller_addr"}})]
709 120 403 $$types{$candidate}{"parameters"} // {}
711 66 56 $$mt{"parameters"} // {}
753 1150 11649 $uri->fragment // ""
799 13954 0 $$state{"depth"} // 0
837 2638 0 $$state{"depth"} // 0

or 3 conditions

line l !l&&r !l&&!r condition
118 30323 8050 3937 $type eq "string" or $type eq "number"
38373 3921 16 $type eq "string" or $type eq "number" or $type eq "integer"
138 683 6111 1254 is_bignum($value) || &created_as_number($value)
145 2 6 9 ref $value eq 'Math::BigInt' || $flags & 256 && !($flags & 512) && &created_as_number($value)
152 130 3717 55 is_bignum($value) && $value->is_int || &created_as_number($value) && int $value == $value
195 22567 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\x15\x55\x55\x55"} 0 + $value eq $value }
219 15924 0 857 $value->isa('JSON::PP::Boolean') || $value->isa('Cpanel::JSON::XS::Boolean') || $value->isa('JSON::XS::Boolean')
353 58 17410 2 grep((ref $data eq $_), ("HASH", "ARRAY")) or defined wantarray
358 17406 4 2 not ref $data or ref $data ne ref $value
386 43 7 63 not ref $$curp or ref $$curp eq "ARRAY" and not $key =~ /^(?:\d+|-)\z/a
394 53 33 27 ref $$curp eq 'HASH' || !($key =~ /^(?:\d+|-)\z/a)
668 3 23 0 $$type{"parameters"} // ()
685 3 4 0 $$type{"parameters"} // ()
694 2 47 39 @$media_types and CORE::any {$_ eq $media_type_string;} @$media_types or not @$media_types and exists $$MEDIA_TYPES{$media_type_string}
711 85 19 18 not exists(($$mt{"parameters"} // {})->{$param}) or $$types{$candidate}{"parameters"}{$param} ne $$mt{"parameters"}{$param}
751 0 12799 21446 @extra_path or length $$state{"keyword_path"}
779 505 2859 10589 $sps // ()
783 13462 368 124 $$state{"keyword"} // ()
884 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
899 6199 0 0 $override // $$schema{$$state{"keyword"}}
902 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