Branch Coverage

blib/lib/Data/YAML/Reader.pm
Criterion Covered Total %
branch 58 76 76.3


line true false branch
43 0 55 unless defined $obj
46 53 2 if (my $ref = ref $obj) { }
47 51 2 if ('CODE' eq $ref) { }
1 1 elsif ('ARRAY' eq $ref) { }
1 0 elsif ('SCALAR' eq $ref) { }
0 0 elsif ('GLOB' eq $ref or 'IO::Handle' eq $ref) { }
59 0 0 if defined $line
88 3 47 unless $dots =~ /$IS_END_YAML/
100 38 0 if (defined(my $capture = $$self{'capture'}))
109 104 359 unless wantarray
117 0 354 unless $$self{'reader'}
130 52 2 if ($line =~ /^ --- (?: \s* (.+?) \s* )? $/x) { }
133 16 36 if defined $1
137 18 18 if ($next =~ /^ - /x) { }
17 1 elsif ($next =~ /$IS_HASH_KEY/) { }
1 0 elsif ($next =~ /$IS_END_YAML/) { }
160 0 29 unless ($str =~ s/^ " (.*?) " $/$1/x)
166 26 28 length $1 > 1 ? :
175 13 374 if $string eq '~'
177 4 370 if ($string eq '>' or $string eq '|')
180 0 4 unless defined $line
187 4 4 if $ind < $indent
191 3 1 $string eq '>' ? :
194 14 356 if ($string =~ /^ ' (.*) ' $/x)
199 29 327 if ($string =~ /$IS_QQ_STRING/)
203 0 327 if ($string =~ /^['"]/)
218 10 28 if ($line =~ /^ -/x) { }
28 0 elsif ($line =~ /$IS_HASH_KEY/) { }
237 17 77 if $indent < $limit or not defined $line or $line =~ /$IS_END_YAML/
239 0 77 if ($indent > $limit)
243 5 72 if ($line =~ /^ (- \s+) \S+ \s* : (?: \s+ | $ ) /x) { }
57 15 elsif ($line =~ /^ - \s* (.+?) \s* $/x) { }
15 0 elsif ($line =~ /^ - \s* $/x) { }
0 0 elsif ($line =~ /$IS_HASH_KEY/) { }
249 1 56 if $line =~ /^---/
276 0 169 unless $line =~ /$HASH_LINE/
282 146 23 if (defined $value) { }
290 16 119 if $indent < $limit or not defined $line or $line =~ /$IS_END_YAML/