Condition Coverage

blib/lib/JSON/Relaxed/Parser.pm
Criterion Covered Total %
condition 89 142 62.6


and 3 conditions

line !l l&&!r l&&r condition
76 0 0 95 defined $data and length $data
311 1 6 163 $implied_outer_hash and not $strict
313 52 106 5 @tokens > 2 and $tokens[0]->is_string
158 0 5 @tokens > 2 and $tokens[0]->is_string and $tokens[1]->token =~ /[:={]/u
342 75 91 4 $opts{'top'} and @tokens
166 0 4 $opts{'top'} and @tokens and $strict || !$extra_tokens_ok
0 1 3 $opts{'top'} and @tokens and $strict || !$extra_tokens_ok and not $self->is_error
395 51 0 4 $key_order and not $strict
51 2 2 $key_order and not $strict and @ko > 1
413 0 0 6 $combined_keys and not $strict
430 0 0 4 $prp and $next->token eq "{"
496 2 3 152 $combined_keys and not $strict
5 134 18 $combined_keys and not $strict and $key =~ /\./su
526 210 1 88 $t eq "," and !$strict || @$rv
641 24 0 0 $v =~ /^$p_number$/u and 0 + $v ne $v
682 0 0 2 $i + length(join $", @v) < 72 and not join("", @v) =~ /\s|$p_newlines/u
734 0 8 8 $ckeys and ref $v eq "HASH"
8 2 6 $ckeys and ref $v eq "HASH" and keys %$v == 1
838 10 6 1 $pretty and not $level
897 0 0 0 $hr and $hl
1113 0 95 4 $self->parent->prp and $content =~ /^(?:on|off)$/u

or 2 conditions

line l !l condition
321 170 0 shift @tokens // (return)
544 158 0 $tokens[0] || ''
577 12 5 $opts{'level'} // 0
579 0 17 $opts{'indent'} // 2
585 0 17 $opts{'nounicodeescapes'} // 0

or 3 conditions

line l !l&&r !l&&!r condition
286 164 22 621 $typ eq 'U' || $typ eq 'N'
342 3 1 0 $strict || !$extra_tokens_ok
426 0 0 79 $next->token eq "," or $next->token eq "}"
526 85 3 1 !$strict || @$rv
550 112 46 0 $next->token =~ /^[,\]]$/u or $next->is_string
158 0 0 $next->token =~ /^[,\]]$/u or $next->is_string or $next->is_list_opener
580 0 17 0 $opts{'implied_outer_hash'} // $implied_outer_hash
581 0 17 0 $opts{'combined_keys'} // $combined_keys
582 0 17 0 $opts{'prp'} // $prp
583 14 0 3 $opts{'pretty'} // $pretty
584 0 0 17 $opts{'strict'} // $strict
623 1 0 24 UNIVERSAL::isa($str, "JSON::Boolean") or UNIVERSAL::isa($str, "JSON::PP::Boolean")
641 0 0 24 $v ne $str or $v =~ /^$p_number$/u and 0 + $v ne $v
0 6 18 $v ne $str or $v =~ /^$p_number$/u and 0 + $v ne $v or $v =~ /$p_reserved/u
6 0 18 $v ne $str or $v =~ /^$p_number$/u and 0 + $v ne $v or $v =~ /$p_reserved/u or $v =~ /$p_quotes/u
6 0 18 $v ne $str or $v =~ /^$p_number$/u and 0 + $v ne $v or $v =~ /$p_reserved/u or $v =~ /$p_quotes/u or $v =~ /\s/u
0 1 17 $v ne $str or $v =~ /^$p_number$/u and 0 + $v ne $v or $v =~ /$p_reserved/u or $v =~ /$p_quotes/u or $v =~ /\s/u or $v =~ /^(true|false|null)$/u
1 6 11 $v ne $str or $v =~ /^$p_number$/u and 0 + $v ne $v or $v =~ /$p_reserved/u or $v =~ /$p_quotes/u or $v =~ /\s/u or $v =~ /^(true|false|null)$/u or not length $v
702 3 0 5 $level or not $impoh
749 3 0 7 UNIVERSAL::can($v, "TO_JSON") // UNIVERSAL::can($v, "FREEZE")
809 3 0 5 $level or not $impoh
822 0 0 17 UNIVERSAL::can($rv, "TO_JSON") // UNIVERSAL::can($rv, "FREEZE")
853 0 0 0 $k eq "oneOf" or $k eq "anyOf"