Condition Coverage

blib/lib/JSON/backportPP.pm
Criterion Covered Total %
condition 170 275 61.8


and 3 conditions

line !l l&&!r l&&r condition
211 0 0 0 builtin::is_bool($true) and builtin::is_bool($false)
0 0 0 builtin::is_bool($true) and builtin::is_bool($false) and $true
0 0 0 builtin::is_bool($true) and builtin::is_bool($false) and $true and not $false
259 0 0 0 exists $self->{'true'} and exists $self->{'false'}
266 1 0 2 defined $_[1] and ref $_[1] eq "CODE"
279 1 0 3 defined $_[2] and ref $_[2] eq "CODE"
365 16 0 0 $self->{'PROPS'}[19] and $obj->can("FREEZE")
369 0 0 0 @results and ref $results[0]
380 5 3 8 $self->{'PROPS'}[10] and $obj->can("TO_JSON")
382 0 4 4 defined $result and ref $result
394 6 0 2 $self->{'PROPS'}[13] and _is_bignum($obj)
454 2 24992 0 $pre eq '' && $self->{'PROPS'}[6]
487 20 0 18 builtin::blessed($value) and $value->isa("JSON::PP::Boolean")
505 10 3 7 $type eq "SCALAR" and defined $$value
684 1 2 12435 $octets[0] && $octets[1]
2 0 1 !$octets[0] && $octets[1]
705 12435 15 3 $encoding ne "UTF-8" and $encoding ne "unknown"
769 977 0 2 $self->{'PROPS'}[15] and $ch eq "'"
784 5 0 4 $self->{'PROPS'}[15] and $ch eq "'"
889 144529 103 0 $self->{'PROPS'}[11] and $ch eq "/"
894 0 0 0 defined $ch and $ch eq "/"
0 0 0 defined $ch and $ch eq "*"
895 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"
902 0 0 0 defined($ch = $self->_next_chr) and $ch eq "/"
923 144529 94 9 $self->{'PROPS'}[11] and $ch eq "#"
948 0 26262 22 defined $ch and $ch eq "]"
978 804 9 2 $self->{'PROPS'}[11] and $ch eq "]"
987 3 0 2 defined $ch and $ch ne ""
1034 0 2162 8 defined $ch and $ch eq "}"
1044 3459 0 2 $self->{'PROPS'}[14] && $ch ne '"' && $ch ne q[']
1077 1300 0 1 $self->{'PROPS'}[11] and $ch eq "}"
1090 2 0 4 defined $ch and $ch ne ""
1150 0 1 40 defined $ch and $ch =~ /\d/
1165 5 880 1012 defined $ch and $ch =~ /\d/
1170 5 853 27 defined $ch and $ch eq "."
1175 1 0 26 defined $ch && $ch =~ /\d/
1182 2 24 75 defined($ch = $self->_next_chr) and $ch =~ /\d/
1187 7 872 5 defined $ch and $ch eq 'e' || $ch eq 'E'
1192 1 19 16 defined $ch and $ch eq '+' || $ch eq '-'
1 1 18 defined $ch and $ch =~ /\d/
1207 16 16 11 defined($ch = $self->_next_chr) and $ch =~ /\d/
1329 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]}
1469 2 318 1 $self->{'incr_nest'} <= 0 and $self->{'incr_mode'} == 3
1472 317 1 1 $max_size and $self->{'incr_pos'} > $max_size
1475 2 44 272 $self->{'incr_nest'} <= 0 and $self->{'incr_mode'} == 3
1477 4 38 4 $self->{'incr_mode'} == 0 and $self->{'incr_pos'}
1553 35 0 0 $p >= $len and $self->{'incr_nest'}
1556 0 35 105 defined $s and $s =~ /[rueals]/
1565 380 0 0 $p >= $len and $self->{'incr_nest'}
1568 0 375 16 defined $s and $s =~ /[0-9eE.+\-]/

or 2 conditions

line l !l condition
49 0 57 $ENV{'PERL_JSON_PP_USE_B'} || 0
566 0 0 builtin::reftype($_[1]) || ''
824 1127735 0 _decode_surrogates($utf16, $u) || (next)
835 2893170 0 _decode_unicode($u) || (next)
939 0 26287 $_[0] || []
1025 0 2170 $_[0] || {}
1492 269 0 $offset || 0

or 3 conditions

line l !l&&r !l&&!r condition
112 185 0 0 $JSON ||= __PACKAGE__->new->utf8
117 6200 57 0 $JSON ||= __PACKAGE__->new->utf8
271 2 1 0 $_[0]{'cb_object'} || $_[0]{'cb_sk_object'}
276 0 0 4 @_ == 1 or @_ > 3
285 4 0 0 $_[0]{'cb_object'} || $_[0]{'cb_sk_object'}
290 0 0 0 not defined $_[1] or $_[1] > 15
0 0 0 not defined $_[1] or $_[1] > 15 or $_[1] < 0
339 25065 60 0 ref $obj or $props->[7]
366 0 0 0 ref $obj || $obj
516 2 4 3 $type eq "SCALAR" or $type eq "REF"
684 2 0 0 $octets[0] || $octets[1]
697 1 3 25261 not defined $text or ref $text
734 24986 198 4 $props->[7] or ref $result
769 26350 4 975 $ch eq "\"" or $self->{'PROPS'}[15] and $ch eq "'"
770 850 41 86 $ch =~ /[0-9]/ or $ch eq "-"
784 29802 5 4 $ch eq "\"" or $self->{'PROPS'}[15] and $ch eq "'"
867 4 0 0 not $self->{'PROPS'}[11] or $ch ne "\t"
889 25260 27330 144632 $ch eq "" or $ch =~ /\A[ \t\r\n]\z/
1005 0 0 0 not defined $ch or $ch ne ")"
1048 1 2 3453 not defined $ch or $ch ne ":"
1187 33 3 841 $ch eq 'e' || $ch eq 'E'
1192 10 6 19 $ch eq '+' || $ch eq '-'
1195 0 2 14 not defined $ch or $ch =~ /\D/
1215 26 22 832 $is_dec or $is_exp
1373 611 26 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1378 2 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1383 0 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1387 293 0 0 $_[0]{'_incr_parser'} ||= "JSON::PP::IncrParser"->new
1408 2 0 0 $_[0]->isa('JSON::PP::Boolean') || $_[0]->isa('Types::Serialiser::BooleanBase') || $_[0]->isa('JSON::XS::Boolean')
1522 6 3 2257 $mode == 4 or $mode == 5
1599 0 0 2444 $s eq "t" or $s eq "f"
0 35 2409 $s eq "t" or $s eq "f" or $s eq "n"
186 169 1091 $s eq "[" or $s eq "{"
183 169 739 $s eq "]" or $s eq "}"