Branch Coverage

lib/ChordPro/lib/JSON/Relaxed/Parser.pm
Criterion Covered Total %
branch 58 244 23.7


line true false branch
58 0 0 if @_
59 0 0 if @_
60 0 0 if @_
76 0 133 unless defined $data and length $data
84 0 133 if $self->is_error
87 0 133 unless @tokens
286 80946 258071 $typ eq 'Q' ? :
253133 339017 $typ eq 'U' || $typ eq 'N' ? :
309 0 69314 if $opts{'tokens'}
311 69314 0 if ($implied_outer_hash and not $strict)
313 132 69182 if (@tokens > 2 and $tokens[0]->is_string and $tokens[1]->token =~ /[:={]/u)
324 0 69314 if ($this->is_string) { }
329 50139 19175 if ($t eq '{') { }
19175 0 elsif ($t eq '[') { }
342 0 0 if ($opts{'top'} and @tokens and $strict || !$extra_tokens_ok and not $self->is_error)
357 0 0 $aux ? :
360 0 0 if $croak_on_error_internal
371 0 0 unless require DDP
372 0 0 if (-t STDERR) { }
394 50139 119707 if ($t eq "}")
395 0 0 if $key_order and not $strict and @ko > 1
401 0 119707 if $t eq ","
406 119707 0 if ($this->is_string) { }
412 0 119707 if ($key_order)
413 0 0 if ($combined_keys and not $strict) { }
423 0 119707 unless defined $next
426 0 119707 if $next->token eq "," or $next->token eq "}"
430 119443 264 if ($next->token =~ /^[:=]$/u) { }
264 0 elsif ($prp and $next->token eq '{') { }
435 0 119443 unless @tokens
441 0 119443 if $self->is_error
450 0 264 if $self->is_error
481 100377 19330 if ($this->is_string) { }
19330 0 elsif ($this->is_list_opener) { }
496 239176 238 unless $combined_keys and not $strict and $key =~ /\./su
502 0 714 if (/^[+-]?\d+$/u) { }
522 19175 163846 if $t eq "]"
526 0 163846 if ($t eq ',' and !$strict || @$rv) { }
49851 113995 elsif ($this->is_list_opener) { }
113995 0 elsif ($this->is_string) { }
533 0 49851 unless defined $object
543 113995 0 if (@tokens)
550 0 94939 unless ($next->token =~ /^[,\]]$/u or $next->is_string or $next->is_list_opener)
570 0 0 unless $pretok eq "//"
587 0 0 if ($strict)
591 0 0 if $schema
603 0 0 unless $p->{$topic}
604 0 0 unless $did++
611 0 0 unless ($level)
619 0 0 unless (defined $str)
623 0 0 if (UNIVERSAL::isa($str, "JSON::Boolean") or UNIVERSAL::isa($str, "JSON::PP::Boolean"))
638 0 0 ord $1 < 65535 ? :
0 0 unless $nouesc
641 0 0 if ($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)
652 0 0 unless ($v =~ /\"/u)
655 0 0 unless ($v =~ /\'/u)
658 0 0 unless ($v =~ /\`/u)
670 0 0 unless @$rv
679 0 0 unless $pretty
682 0 0 if ($i + length(join $", @v) < 72 and not join("", @v) =~ /\s|$p_newlines/u)
697 0 0 unless keys %$rv
702 0 0 if ($level or not $impoh)
703 0 0 $pretty ? :
709 0 0 $rv->{' key order '} ? :
718 0 0 if length $_ > $ll
726 0 0 if ($props->{$k})
728 0 0 if $comment
740 0 0 if $pretty
746 0 0 $comment ? :
750 0 0 $r ? :
753 0 0 if (ref $r eq 'HASH') { }
0 0 elsif (ref $r eq 'ARRAY') { }
0 0 elsif ($pretty) { }
755 0 0 if ($pretty) { }
0 0 elsif (not $prpmode) { }
756 0 0 $prpmode ? :
766 0 0 $pretty ? :
775 0 0 if ($t =~ /^["'`].*\\n/u) { }
788 0 0 if @a
790 0 0 if @a
802 0 0 if $pretty
806 0 0 unless $pretty
809 0 0 if ($level or not $impoh) { }
811 0 0 if $pretty
823 0 0 $r ? :
826 0 0 if (ref $r eq 'HASH') { }
0 0 elsif (ref $r eq 'ARRAY') { }
838 0 0 if ($pretty and not $level)
840 0 0 unless $s =~ /\n$/u
851 0 0 if (is_hash($d)) { }
0 0 elsif (is_array($d)) { }
853 0 0 if ($k eq 'allOf') { }
0 0 elsif ($k eq 'oneOf' or $k eq 'anyOf') { }
0 0 elsif ($k eq '$ref') { }
863 0 0 if ($v =~ m[^#/definitions/(.*)]u) { }
889 0 0 unless $right
897 0 0 if ($hr and $hl) { }
912 0 133426 if @_
913 0 895693 if @_
914 0 0 if @_
915 0 264 if @_
922 69290 113995 if $type eq "C"
931 0 0 if (not defined $token) { }
0 0 elsif ($self->is_string) { }
1018 0 0 if @_
1023 0 0 if defined $quote
1052 334079 0 unless $str =~ /\\/u
1056 0 0 if (defined $1)
1057 0 0 defined $quote ? :
1061 0 0 if defined $2
1064 0 0 if defined $3
1069 0 0 if defined $5
1072 0 0 if defined $6
1078 0 0 unless defined pos $str
1107 119707 133426 if $options{'always_string'}
1110 126 133300 if ($content =~ /^(?:true|false)$/u)
1111 126 0 $content eq 'true' ? :
1113 0 133300 if ($self->parent->prp and $content =~ /^(?:on|off)$/u) { }
0 133300 elsif ($content eq 'null') { }
1114 0 0 $content eq 'on' ? :
1143 27828 23877 ${$_[0];} ? :
1149 0 0 if (${$_[0];}) { }