Branch Coverage

blib/lib/Portable/LoadYaml.pm
Criterion Covered Total %
branch 0 120 0.0


line true false branch
59 0 0 ref $_[0] ? :
62 0 0 unless my $file = shift()
63 0 0 unless -e $file
65 0 0 unless -f _
67 0 0 unless -r _
72 0 0 unless ($fh)
82 0 0 if (my $err = $@)
87 0 0 unless (close $fh)
96 0 0 ref $_[0] ? :
100 0 0 unless (defined $string)
106 0 0 if (utf8::is_utf8($string) and not utf8::valid($string))
120 0 0 unless length $string
127 0 0 if @lines and $lines[0] =~ /^\%YAML[: ][\d\.]+.*\z/
133 0 0 if ($lines[0] =~ /^---\s*(?:(.+)\s*)?\z/)
136 0 0 if (defined $1 and not $1 =~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/)
144 0 0 if (not @lines or $lines[0] =~ /^(?:---|\.\.\.)/) { }
0 0 elsif (not $in_document and @$self) { }
0 0 elsif ($lines[0] =~ /^\s*\-(?:\s|$|-+$)/) { }
0 0 elsif ($lines[0] =~ /^(\s*)\S/) { }
180 0 0 if (ref $@ eq 'SCALAR') { }
0 0 elsif ($@) { }
191 0 0 unless length $string
198 0 0 unless length $string
202 0 0 length $1 > 1 ? :
214 0 0 if $string eq '~'
217 0 0 if ($string =~ /^$re_capture_single_quoted$re_trailing_comment\z/)
222 0 0 if ($string =~ /^$re_capture_double_quoted$re_trailing_comment\z/)
227 0 0 if ($string =~ /^[\'\"!&]/)
230 0 0 if $string =~ /^{}(?:\s+\#.*)?\z/
231 0 0 if $string =~ /^\[\](?:\s+\#.*)?\z/
234 0 0 unless ($string =~ /^[>|]/)
235 0 0 if $string =~ /^(?:-(?:\s|$)|[\@\%\`])/ or $string =~ /:(?:\s|$)/
243 0 0 unless @$lines
248 0 0 if (defined $$indent[-2] and $$indent[-1] <= $$indent[-2])
256 0 0 unless length $1 >= $$indent[-1]
260 0 0 substr($string, 0, 1) eq '>' ? :
261 0 0 substr($string, 1, 1) eq '-' ? :
271 0 0 if ($$lines[0] =~ /^(?:---|\.\.\.)/)
280 0 0 if (length $1 < $$indent[-1]) { }
0 0 elsif (length $1 > $$indent[-1]) { }
286 0 0 if ($$lines[0] =~ /^(\s*\-\s+)[^\'\"]\S*\s*:(?:\s+|$)/) { }
0 0 elsif ($$lines[0] =~ /^\s*\-\s*\z/) { }
0 0 elsif ($$lines[0] =~ /^\s*\-(\s*)(.+?)\s*\z/) { }
0 0 elsif (defined $$indent[-2] and $$indent[-1] == $$indent[-2]) { }
295 0 0 unless (@$lines)
299 0 0 if ($$lines[0] =~ /^(\s*)\-/) { }
0 0 elsif ($$lines[0] =~ /^(\s*)\S/) { }
301 0 0 if ($$indent[-1] == $indent2) { }
353 0 0 if ($$lines[0] =~ /^(?:---|\.\.\.)/)
362 0 0 if (length $1 < $$indent[-1]) { }
0 0 elsif (length $1 > $$indent[-1]) { }
372 0 0 if ($$lines[0] =~ s/^\s*$re_capture_single_quoted$re_key_value_separator//) { }
0 0 elsif ($$lines[0] =~ s/^\s*$re_capture_double_quoted$re_key_value_separator//) { }
0 0 elsif ($$lines[0] =~ s/^\s*$re_capture_unquoted_key$re_key_value_separator//) { }
0 0 elsif ($$lines[0] =~ /^\s*\?/) { }
396 0 0 if (length $$lines[0]) { }
404 0 0 unless (@$lines)
408 0 0 if ($$lines[0] =~ /^(\s*)-/) { }
0 0 elsif ($$lines[0] =~ /^(\s*)./) { }
415 0 0 if ($$indent[-1] >= $indent2) { }