Condition Coverage

blib/lib/JSON/PP.pm
Criterion Covered Total %
condition 181 263 68.8


and 3 conditions

line !l l&&!r l&&r condition
258 2 0 3 exists $self->{'true'} and exists $self->{'false'}
265 1 0 2 defined $_[1] and ref $_[1] eq "CODE"
278 1 0 3 defined $_[2] and ref $_[2] eq "CODE"
393 12 1 1 $allow_tags and $obj->can("FREEZE")
397 0 1 0 @results and ref $results[0]
408 4 4 5 $convert_blessed and $obj->can("TO_JSON")
410 0 3 2 defined $result and ref $result
422 5 0 3 $bignum and _is_bignum($obj)
514 20 0 20 &blessed($value) and $value->isa("JSON::PP::Boolean")
532 10 3 7 $type eq "SCALAR" and defined $$value
745 1 2 12387 $octets[0] && $octets[1]
2 0 1 !$octets[0] && $octets[1]
773 12387 20 3 $encoding ne "UTF-8" and $encoding ne "unknown"
836 905 0 2 $singlequote and $ch eq "'"
849 5 0 4 $singlequote and $ch eq "'"
952 136950 103 0 $relaxed and $ch eq "/"
957 0 0 0 defined $ch and $ch eq "/"
0 0 0 defined $ch and $ch eq "*"
958 0 0 0 defined next_chr() and $ch ne "\n"
0 0 0 defined next_chr() and $ch ne "\n" and $ch ne "\r"
965 0 0 0 defined next_chr() and $ch eq "/"
986 136950 94 9 $relaxed and $ch eq "#"
1009 0 26089 23 defined $ch and $ch eq "]"
1037 748 9 2 $relaxed and $ch eq "]"
1046 3 0 3 defined $ch and $ch ne ""
1089 0 1381 9 defined $ch and $ch eq "}"
1099 1730 0 2 $allow_barekey && $ch ne '"' && $ch ne q[']
1129 352 0 1 $relaxed and $ch eq "}"
1142 3 0 5 defined $ch and $ch ne ""
1197 0 1 40 defined $ch and $ch =~ /\d/
1212 8 798 971 defined $ch and $ch =~ /\d/
1217 8 749 49 defined $ch and $ch eq "."
1222 1 0 48 defined $ch && $ch =~ /\d/
1229 2 46 97 defined next_chr() and $ch =~ /\d/
1234 10 758 37 defined $ch and $ch eq 'e' || $ch eq 'E'
1239 1 19 38 defined $ch and $ch eq '+' || $ch eq '-'
1 1 18 defined $ch and $ch =~ /\d/
1254 16 38 33 defined next_chr() and $ch =~ /\d/
1373 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]}
1525 23 370 1 $self->{'incr_nest'} <= 0 and $self->{'incr_mode'} == 3
1528 390 1 1 $max_size and $self->{'incr_pos'} > $max_size
1531 33 50 308 $self->{'incr_nest'} <= 0 and $self->{'incr_mode'} == 3
1533 37 39 7 $self->{'incr_mode'} == 0 and $self->{'incr_pos'}
1609 35 0 1 $p >= $len and $self->{'incr_nest'}
1612 0 35 105 defined $s and $s =~ /[rueals]/
1621 394 2 3 $p >= $len and $self->{'incr_nest'}
1624 0 389 93 defined $s and $s =~ /[0-9eE.+\-]/

or 2 conditions

line l !l condition
48 0 64 $ENV{'PERL_JSON_PP_USE_B'} || 0
593 0 0 &reftype($_[1]) || ''
889 1127976 0 _decode_surrogates($utf16, $u) || (next)
900 2891847 0 _decode_unicode($u) || (next)
1001 0 26115 $_[0] || []
1081 0 1390 $_[0] || {}
1548 298 0 $offset || 0

or 3 conditions

line l !l&&r !l&&!r condition
111 183 3 0 $JSON ||= "JSON::PP"->new->utf8
116 6187 19 0 $JSON ||= "JSON::PP"->new->utf8
270 2 1 0 $_[0]{'cb_object'} || $_[0]{'cb_sk_object'}
275 0 0 4 @_ == 1 or @_ > 3
284 4 0 0 $_[0]{'cb_object'} || $_[0]{'cb_sk_object'}
289 0 0 0 not defined $_[1] or $_[1] > 15
0 0 0 not defined $_[1] or $_[1] > 15 or $_[1] < 0
367 25063 78 0 ref $obj or $props->[7]
394 1 0 0 ref $obj || $obj
543 2 4 3 $type eq "SCALAR" or $type eq "REF"
745 2 0 0 $octets[0] || $octets[1]
760 1 3 25265 not defined $text or ref $text
804 24981 198 5 $props->[7] or ref $result
836 25420 2 905 $ch eq "\"" or $singlequote and $ch eq "'"
837 771 41 93 $ch =~ /[0-9]/ or $ch eq "-"
849 27143 5 4 $ch eq "\"" or $singlequote and $ch eq "'"
932 4 0 0 not $relaxed or $ch ne "\t"
952 25263 2406 137053 $ch eq "" or $ch =~ /\A[ \t\r\n]\z/
1062 0 0 1 not defined $ch or $ch ne ")"
1102 1 2 1724 not defined $ch or $ch ne ":"
1234 33 25 737 $ch eq 'e' || $ch eq 'E'
1239 32 6 19 $ch eq '+' || $ch eq '-'
1242 0 2 36 not defined $ch or $ch =~ /\D/
1262 48 22 731 $is_dec or $is_exp
1430 687 57 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1435 2 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1440 0 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1444 304 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1465 2 0 0 $_[0]->isa('JSON::PP::Boolean') || $_[0]->isa('Types::Serialiser::BooleanBase') || $_[0]->isa('JSON::XS::Boolean')
1578 6 3 2740 $mode == 4 or $mode == 5
1655 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 "}"