Condition Coverage

blib/lib/JSON/backportPP.pm
Criterion Covered Total %
condition 182 266 68.4


and 3 conditions

line !l l&&!r l&&r condition
267 5 0 5 exists $self->{'true'} and exists $self->{'false'}
274 1 0 2 defined $_[1] and ref $_[1] eq "CODE"
287 1 0 3 defined $_[2] and ref $_[2] eq "CODE"
402 17 1 1 $allow_tags and $obj->can("FREEZE")
406 0 1 0 @results and ref $results[0]
417 5 4 9 $convert_blessed and $obj->can("TO_JSON")
419 0 5 4 defined $result and ref $result
431 6 0 3 $bignum and _is_bignum($obj)
524 20 0 28 &blessed($value) and $value->isa("JSON::PP::Boolean")
542 10 3 7 $type eq "SCALAR" and defined $$value
755 1 2 12387 $octets[0] && $octets[1]
2 0 1 !$octets[0] && $octets[1]
783 12387 20 3 $encoding ne "UTF-8" and $encoding ne "unknown"
846 921 0 2 $singlequote and $ch eq "'"
859 5 0 4 $singlequote and $ch eq "'"
962 136998 103 0 $relaxed and $ch eq "/"
967 0 0 0 defined $ch and $ch eq "/"
0 0 0 defined $ch and $ch eq "*"
968 0 0 0 defined next_chr() and $ch ne "\n"
0 0 0 defined next_chr() and $ch ne "\n" and $ch ne "\r"
975 0 0 0 defined next_chr() and $ch eq "/"
996 136998 94 9 $relaxed and $ch eq "#"
1019 0 26093 23 defined $ch and $ch eq "]"
1047 750 9 2 $relaxed and $ch eq "]"
1056 3 0 3 defined $ch and $ch ne ""
1099 0 1381 9 defined $ch and $ch eq "}"
1109 1730 0 2 $allow_barekey && $ch ne '"' && $ch ne q[']
1139 352 0 1 $relaxed and $ch eq "}"
1152 3 0 5 defined $ch and $ch ne ""
1207 0 1 40 defined $ch and $ch =~ /\d/
1222 8 798 971 defined $ch and $ch =~ /\d/
1227 8 749 49 defined $ch and $ch eq "."
1232 1 0 48 defined $ch && $ch =~ /\d/
1239 2 46 97 defined next_chr() and $ch =~ /\d/
1244 10 758 37 defined $ch and $ch eq 'e' || $ch eq 'E'
1249 1 19 38 defined $ch and $ch eq '+' || $ch eq '-'
1 1 18 defined $ch and $ch =~ /\d/
1264 16 38 33 defined next_chr() and $ch =~ /\d/
1295 0 0 57 $] >= "5.006" and require warnings
1390 0 4 5 $cb_sk_object and @ks == 1
4 1 4 $cb_sk_object and @ks == 1 and exists $$cb_sk_object{$ks[0]}
5 0 4 $cb_sk_object and @ks == 1 and exists $$cb_sk_object{$ks[0]} and ref $$cb_sk_object{$ks[0]}
1639 23 370 1 $self->{'incr_nest'} <= 0 and $self->{'incr_mode'} == 3
1642 390 1 1 $max_size and $self->{'incr_pos'} > $max_size
1645 33 50 308 $self->{'incr_nest'} <= 0 and $self->{'incr_mode'} == 3
1647 37 39 7 $self->{'incr_mode'} == 0 and $self->{'incr_pos'}
1723 35 0 1 $p >= $len and $self->{'incr_nest'}
1726 0 35 105 defined $s and $s =~ /[rueals]/
1735 394 2 3 $p >= $len and $self->{'incr_nest'}
1738 0 389 93 defined $s and $s =~ /[0-9eE.+\-]/

or 2 conditions

line l !l condition
49 0 57 $ENV{'PERL_JSON_PP_USE_B'} || 0
603 0 0 &reftype($_[1]) || ''
899 1127736 0 JSON_PP_decode_surrogates($utf16, $u) || (next)
910 2893171 0 JSON_PP_decode_unicode($u) || (next)
1011 0 26119 $_[0] || []
1091 0 1390 $_[0] || {}
1662 298 0 $offset || 0

or 3 conditions

line l !l&&r !l&&!r condition
120 183 3 0 $JSON ||= "JSON::PP"->new->utf8
125 6202 4 0 $JSON ||= "JSON::PP"->new->utf8
279 2 1 0 $_[0]{'cb_object'} || $_[0]{'cb_sk_object'}
284 0 0 4 @_ == 1 or @_ > 3
293 4 0 0 $_[0]{'cb_object'} || $_[0]{'cb_sk_object'}
298 0 0 0 not defined $_[1] or $_[1] > 15
0 0 0 not defined $_[1] or $_[1] > 15 or $_[1] < 0
376 25081 82 0 ref $obj or $props->[7]
403 1 0 0 ref $obj || $obj
553 2 4 3 $type eq "SCALAR" or $type eq "REF"
755 2 0 0 $octets[0] || $octets[1]
770 1 3 25280 not defined $text or ref $text
814 24996 198 5 $props->[7] or ref $result
846 25421 2 921 $ch eq "\"" or $singlequote and $ch eq "'"
847 771 41 109 $ch =~ /[0-9]/ or $ch eq "-"
859 27144 5 4 $ch eq "\"" or $singlequote and $ch eq "'"
942 4 0 0 not $relaxed or $ch ne "\t"
962 25278 2406 137101 $ch eq "" or $ch =~ /\A[ \t\r\n]\z/
1072 0 0 1 not defined $ch or $ch ne ")"
1112 1 2 1724 not defined $ch or $ch ne ":"
1244 33 25 737 $ch eq 'e' || $ch eq 'E'
1249 32 6 19 $ch eq '+' || $ch eq '-'
1252 0 2 36 not defined $ch or $ch =~ /\D/
1272 48 22 731 $is_dec or $is_exp
1482 687 57 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1487 2 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1492 0 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1495 304 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1578 2 0 0 $_[0]->isa('JSON::PP::Boolean') || $_[0]->isa('Types::Serialiser::BooleanBase') || $_[0]->isa('JSON::XS::Boolean')
1692 6 3 2740 $mode == 4 or $mode == 5
1769 1 0 2889 $s eq "t" or $s eq "f"
1 35 2854 $s eq "t" or $s eq "f" or $s eq "n"
188 195 1290 $s eq "[" or $s eq "{"
185 184 921 $s eq "]" or $s eq "}"