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"
364 15 1 1 $self->{'PROPS'}[19] and $obj->can("FREEZE")
368 0 1 0 @results and ref $results[0]
379 4 4 8 $self->{'PROPS'}[10] and $obj->can("TO_JSON")
381 0 6 2 defined $result and ref $result
393 5 0 3 $self->{'PROPS'}[13] and _is_bignum($obj)
485 20 0 20 &blessed($value) and $value->isa("JSON::PP::Boolean")
503 10 3 7 $type eq "SCALAR" and defined $$value
682 1 2 12387 $octets[0] && $octets[1]
2 0 1 !$octets[0] && $octets[1]
703 12387 20 3 $encoding ne "UTF-8" and $encoding ne "unknown"
767 905 0 2 $self->{'PROPS'}[15] and $ch eq "'"
782 5 0 4 $self->{'PROPS'}[15] and $ch eq "'"
887 136950 103 0 $self->{'PROPS'}[11] and $ch eq "/"
892 0 0 0 defined $ch and $ch eq "/"
0 0 0 defined $ch and $ch eq "*"
893 0 0 0 defined($ch = $self->_next_chr) and $ch ne "\n"
0 0 0 defined($ch = $self->_next_chr) and $ch ne "\n" and $ch ne "\r"
900 0 0 0 defined($ch = $self->_next_chr) and $ch eq "/"
921 136950 94 9 $self->{'PROPS'}[11] and $ch eq "#"
946 0 26089 23 defined $ch and $ch eq "]"
976 748 9 2 $self->{'PROPS'}[11] and $ch eq "]"
985 3 0 3 defined $ch and $ch ne ""
1032 0 1381 9 defined $ch and $ch eq "}"
1042 1730 0 2 $self->{'PROPS'}[14] && $ch ne '"' && $ch ne q[']
1075 352 0 1 $self->{'PROPS'}[11] and $ch eq "}"
1088 3 0 5 defined $ch and $ch ne ""
1148 0 1 40 defined $ch and $ch =~ /\d/
1163 8 798 971 defined $ch and $ch =~ /\d/
1168 8 749 49 defined $ch and $ch eq "."
1173 1 0 48 defined $ch && $ch =~ /\d/
1180 2 46 97 defined($ch = $self->_next_chr) and $ch =~ /\d/
1185 10 758 37 defined $ch and $ch eq 'e' || $ch eq 'E'
1190 1 19 38 defined $ch and $ch eq '+' || $ch eq '-'
1 1 18 defined $ch and $ch =~ /\d/
1205 16 38 33 defined($ch = $self->_next_chr) and $ch =~ /\d/
1327 0 4 5 $self->{'cb_sk_object'} and @ks == 1
4 1 4 $self->{'cb_sk_object'} and @ks == 1 and exists $self->{'cb_sk_object'}{$ks[0]}
5 0 4 $self->{'cb_sk_object'} and @ks == 1 and exists $self->{'cb_sk_object'}{$ks[0]} and ref $self->{'cb_sk_object'}{$ks[0]}
1466 23 370 1 $self->{'incr_nest'} <= 0 and $self->{'incr_mode'} == 3
1469 390 1 1 $max_size and $self->{'incr_pos'} > $max_size
1472 33 50 308 $self->{'incr_nest'} <= 0 and $self->{'incr_mode'} == 3
1474 37 39 7 $self->{'incr_mode'} == 0 and $self->{'incr_pos'}
1550 35 0 1 $p >= $len and $self->{'incr_nest'}
1553 0 35 105 defined $s and $s =~ /[rueals]/
1562 394 2 3 $p >= $len and $self->{'incr_nest'}
1565 0 389 93 defined $s and $s =~ /[0-9eE.+\-]/

or 2 conditions

line l !l condition
48 0 65 $ENV{'PERL_JSON_PP_USE_B'} || 0
564 0 0 &reftype($_[1]) || ''
822 1127976 0 _decode_surrogates($utf16, $u) || (next)
833 2891847 0 _decode_unicode($u) || (next)
937 0 26115 $_[0] || []
1023 0 1390 $_[0] || {}
1489 298 0 $offset || 0

or 3 conditions

line l !l&&r !l&&!r condition
111 185 4 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
338 25068 78 0 ref $obj or $props->[7]
365 1 0 0 ref $obj || $obj
514 2 4 3 $type eq "SCALAR" or $type eq "REF"
682 2 0 0 $octets[0] || $octets[1]
695 1 3 25265 not defined $text or ref $text
732 24981 198 5 $props->[7] or ref $result
767 25420 2 905 $ch eq "\"" or $self->{'PROPS'}[15] and $ch eq "'"
768 771 41 93 $ch =~ /[0-9]/ or $ch eq "-"
782 27143 5 4 $ch eq "\"" or $self->{'PROPS'}[15] and $ch eq "'"
865 4 0 0 not $self->{'PROPS'}[11] or $ch ne "\t"
887 25263 2406 137053 $ch eq "" or $ch =~ /\A[ \t\r\n]\z/
1003 0 0 1 not defined $ch or $ch ne ")"
1046 1 2 1724 not defined $ch or $ch ne ":"
1185 33 25 737 $ch eq 'e' || $ch eq 'E'
1190 32 6 19 $ch eq '+' || $ch eq '-'
1193 0 2 36 not defined $ch or $ch =~ /\D/
1213 48 22 731 $is_dec or $is_exp
1371 687 57 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1376 2 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1381 0 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1385 304 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1406 2 0 0 $_[0]->isa('JSON::PP::Boolean') || $_[0]->isa('Types::Serialiser::BooleanBase') || $_[0]->isa('JSON::XS::Boolean')
1519 6 3 2740 $mode == 4 or $mode == 5
1596 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 "}"