Branch Coverage

blib/lib/Config/JSON/Enhanced.pm
Criterion Covered Total %
branch 37 48 77.0


line true false branch
47 19 553 if (exists $params->{'filename'} and defined(my $infile = $params->{'filename'})) { }
11 542 elsif (exists $params->{'filehandle'} and defined(my $fh = $params->{'filehandle'})) { }
542 0 elsif (exists $params->{'string'} and defined $params->{'string'}) { }
49 0 19 unless (open $fh, "<:encoding(UTF-8)", $infile)
57 0 572 unless (defined $contents)
60 0 572 exists $params->{'debug'} && defined $params->{'debug'} ? :
64 572 0 exists $params->{'commentstyle'} && defined $params->{'commentstyle'} ? :
68 13 559 if (exists $params->{'tags'} and defined $params->{'tags'}) { }
69 0 13 if (ref $params->{'tags'} ne "ARRAY")
70 0 13 if (scalar @{$params->{'tags'};} != 2)
75 522 50 exists $params->{'variable-substitutions'} ? :
81 18 554 exists $params->{'remove-comments-in-strings'} && defined $params->{'remove-comments-in-strings'} ? :
93 0 35 if ($ak =~ /(?:\Q$tvop\E)|(?:\Q$tvcl\E)/)
98 0 572 if ($contents =~ /\Q$tvop\E\s*!(:?(:?begin-verbatim-section)|(:?end-verbatim-section))\s*\Q$tvcl\E/)
130 564 8 if ($remove_comments_in_strings == 0)
141 407 165 if ($tc =~ s/\bC\b//i)
144 422 150 if ($tc =~ s/\bCPP\b//i)
148 373 199 if ($tc =~ s/\bshell\b//i)
162 385 1375 if ($cocl =~ /^\s*$/) { }
169 0 572 if ($tc =~ /[a-z]/i)
173 1 571 if ($contents =~ /\Q$tvop\E.+?-verbatim-section\s*\Q$tvcl\E/)
175 564 8 if ($remove_comments_in_strings == 0)
188 0 572 if ($debug > 0)
192 1 571 unless (defined $inhash)