Branch Coverage

blib/lib/Data/Roundtrip.pm
Criterion Covered Total %
branch 85 172 49.4


line true false branch
80 0 0 if $_permanent_filter
94 1 5 if ($_[$i] eq 'no-unicode-escape-permanently') { }
1 4 elsif ($_[$i] eq 'unicode-escape-permanently') { }
120 17 8 defined $_[1] ? :
122 3 22 exists $params->{'pretty'} && defined $params->{'pretty'} ? :
125 15 10 exists $params->{'escape-unicode'} && defined $params->{'escape-unicode'} ? :
128 8 17 if ($escape_unicode) { }
129 2 6 if ($pretty_printing) { }
132 7 1 if (_has_utf8($json_string))
136 0 17 if ($pretty_printing) { }
146 0 25 unless ($json_string)
151 15 8 defined $_[1] ? :
153 3 20 exists $params->{'pretty'} && defined $params->{'pretty'} ? :
155 2 21 if $pretty_printing
159 12 11 exists $params->{'escape-unicode'} && defined $params->{'escape-unicode'} ? :
162 7 16 if ($escape_unicode) { }
172 0 0 defined $@ ? :
0 7 if ($@ or not defined $yaml_string)
174 0 7 unless ($yaml_string)
175 6 1 if (_has_utf8($yaml_string))
185 0 0 defined $@ ? :
0 16 if ($@ or not defined $yaml_string)
187 0 16 unless ($yaml_string)
196 0 0 defined $@ ? :
0 23 if ($@ or not defined $pv)
203 0 4 unless (defined $contents)
205 0 4 unless (defined $pv)
212 17 10 if (_has_utf8($json_string)) { }
215 0 0 defined $@ ? :
0 17 if ($@ or not defined $pv)
219 0 0 defined $@ ? :
0 10 if ($@ or not defined $pv)
227 0 4 unless (defined $contents)
229 0 4 unless (defined $pv)
234 0 0 defined $_[1] ? :
237 0 0 unless (defined $pv)
239 0 0 unless (defined $json_string)
245 0 0 defined $_[1] ? :
248 0 0 unless (defined $pv)
250 0 0 unless (defined $yaml_string)
256 0 0 defined $_[1] ? :
259 0 0 unless (defined $pv)
261 0 0 unless (defined $dump_string)
267 10 2 defined $_[1] ? :
272 0 12 unless ($pv)
274 0 12 unless ($json)
279 0 0 defined $_[1] ? :
282 0 0 unless ($pv)
284 0 0 unless ($dump)
289 4 0 defined $_[1] ? :
292 0 4 unless ($pv)
294 0 4 unless ($dump)
299 2 0 defined $_[1] ? :
302 0 2 unless ($pv)
304 0 2 unless ($json_string)
309 0 0 defined $_[1] ? :
312 0 0 unless ($pv)
314 0 0 unless ($yaml_string)
319 9 3 defined $_[1] ? :
322 0 12 unless (defined $pv)
324 0 12 unless (defined $yaml_string)
340 0 0 defined $@ ? :
0 35 if ($@ or not defined $pv)
371 32 2 defined $_[1] ? :
374 27 7 exists $params->{'terse'} && defined $params->{'terse'} ? :
377 18 16 exists $params->{'indent'} && defined $params->{'indent'} ? :
380 18 0 if ($_permanent_override == 0 and exists $params->{'dont-bloody-escape-unicode'} && defined $params->{'dont-bloody-escape-unicode'} && $params->{'dont-bloody-escape-unicode'} == 1 || exists $params->{'escape-unicode'} && defined $params->{'escape-unicode'} && $params->{'escape-unicode'} == 0)
412 12 2 defined $_[1] ? :
414 4 0 if ($_permanent_filter == 0 and exists $params->{'dont-bloody-escape-unicode'} && defined $params->{'dont-bloody-escape-unicode'} && $params->{'dont-bloody-escape-unicode'} == 1 || exists $params->{'escape-unicode'} && defined $params->{'escape-unicode'} && $params->{'escape-unicode'} == 0)
433 3 2 defined $_[1] ? :
435 3 0 if ($_permanent_override == 1 or exists $params->{'dont-bloody-escape-unicode'} and defined $params->{'dont-bloody-escape-unicode'} and $params->{'dont-bloody-escape-unicode'} == 1 or exists $params->{'escape-unicode'} and defined $params->{'escape-unicode'} and $params->{'escape-unicode'} == 0)
464 1743 3 defined $_[1] ? :
466 1720 26 if ($aref eq '') { }
0 26 elsif ($aref eq 'SCALAR') { }
16 10 elsif ($aref eq 'HASH') { }
10 0 elsif ($aref eq 'ARRAY') { }
517 0 8 unless (open $FH, "<:encoding(UTF-8)", $infile)
530 0 0 unless (open $FH, ">:encoding(UTF-8)", $outfile)
534 0 0 unless (write_to_filehandle($FH, $contents))
566 0 4032 unless defined $_
569 4030 2 unless /[[:^print:]]/
588 0 2 if ($high eq 'iso8859') { }
2 0 elsif ($high eq 'utf8') { }
0 0 elsif ($high eq '8bit') { }
589 0 0 if ($Data_Dumper_IS_ASCII) { }
0 0 elsif ($] ge 5.007003) { }