Branch Coverage

blib/lib/CPAN/Changes/Parser.pm
Criterion Covered Total %
branch 65 72 90.2


line true false branch
43 0 28 defined $layers ? :
44 0 28 unless open my $fh, $mode, $file
46 28 0 unless (defined $layers)
65 892 168 defined $r->{$_} ? :
69 212 0 $_->{'entries'} ? :
73 15 22 defined $data->{'preamble'} ? :
86 86 1198 $entry->{'entries'} ? :
109 0 129 if (defined(my $vp = $self->version_prefix))
113 101 28 if (defined(my $vt = $self->version_like))
124 129 29572 unless length $full_line
127 2572 27000 if ($line =~ /^(?:$version_prefix\s+)?($version_token)(?:[:;.-]?\s+(.*))?$/i) { }
7561 19439 elsif (not @indents) { }
132 2393 179 if (defined $note)
136 1404 1168 defined $date ? :
1404 1168 defined $raw_date ? :
1292 1280 defined $note ? :
154 3460 15979 if ($line =~ /^[-_*+~#=\s]*$/)
155 3071 389 if @indents > 1
158 3460 0 if (@indents) { }
174 115 15864 if ($line =~ /^\[\s*([^\[\]]*)\]$/) { }
9101 6763 elsif ($line =~ /^([-*+=#]+)\s+(.*)/) { }
187 5613 340 if (defined $indents[-1]{'text'} and not $indents[-1]{'done'} and $indent > $#indents || $indent == $#indents && (length $indents[-1]{'style'} || $indent == 1))
210 113 10253 if (not $nest and $indents[$indent]{'nested'}) { }
102 10151 elsif (not $nest and $indents[$indent]{'nest'}) { }
231 10302 64 if ($indent <= $#indents)
238 87 42 if (length $raw_preamble)
247 3248 9690 if $entry->{'entries'}
251 87 42 defined $preamble ? :
331 2393 0 if (defined $note and length $note)
336 16 2377 if ($note =~ s/^($_UNKNOWN_DATE)//) { }
508 1869 elsif ($note =~ s/^($_LOCALTIME_DATE)//) { }
2 1867 elsif ($note =~ s/^($_RFC_2822_DATE)//) { }
7 1860 elsif ($note =~ s/^($_DZIL_DATE)//) { }
871 989 elsif ($note =~ s/^($_ISO_8601_DATE)//) { }
344 501 7 if ($5)
371 265 535 if length $parsed_date == 16 or length $parsed_date == 19 or $parsed_date =~ /\.\d+$/