Branch Coverage

blib/lib/Biblio/Document/Parser/Standard.pm
Criterion Covered Total %
branch 54 192 28.1


line true false branch
115 1 8 if (/(?:references)|(?:bibliography)|(?:\s+cited)/i) { }
0 8 elsif (/\f/) { }
130 1 0 if ($pivot)
136 0 15 if (/\f/) { }
145 0 15 if (/^(.{$pivotl,$pivotr})\s{3}(\s{3,})?(\S.+?)$/) { }
148 0 0 if defined $1
149 0 0 if defined $3
165 0 14 if (/^\s*references\s*$/i or /REFERENCES/ or /Bibliography/i or /References and Notes/)
168 1 0 if defined $'
171 0 14 if (/^\s*\bappendix\b/i or /_{6}.{0,10}$/ or /^\s*\btable\b/i or /wish to thank/i or /\bfigure\s+\d/)
176 6 8 if (/^\s*$/) { }
178 2 4 if ($prevnew)
186 0 12 if (/^\s*\d+\s*$/)
188 5 7 if ($in_refs)
190 0 5 /^(\s+)/ ? :
191 0 5 if (@newlines and /^(\s+)[a-z]/ and _within(length $1, length $newlines[$#newlines], 5)) { }
201 0 1 unless ($in_refs)
208 0 0 if (/^\s*[\[\(](\d+)[\]\)]/ or /^\s*(\d+)(?:\.|\s{5,})/) { }
0 0 elsif ($numwo++ == 5) { }
0 0 elsif ($numwith == 5) { }
209 0 0 if $1 == 1
210 0 0 if ($lastnum and $1 == $lastnum + 1) { }
224 0 0 if $first and $numwith == 5
251 0 1 if ($ref_b >= 5)
253 0 0 if defined $ref_sect
259 3 3 if (/^\s*$/)
263 0 6 if (/^(\s+)\b/)
265 0 0 if (length $1 < $indmin)
266 0 0 if (length $1 > $indmax)
267 0 0 if (length $1 >= $indmax and /^\s+[A-Z]/)
269 0 6 if (/^\s*\d+\.?\s+[[:alnum:]]/)
273 0 6 if (/^\s*[\[\(]\d+[\]\)]\s+[[:alnum:]]/)
277 0 6 if (/^\s*[\[\(][A-Za-z]\w*[\]\)]\s/)
287 0 0 $numind >= $#newlines / 2 ? :
0 0 if ($numnew < $#newlines / 2 and $indmax >= $indmin and $indmax != 0 and $indmin != 255 and $indmax < 24)
288 0 1 if ($numnum > 3)
289 0 1 if ($numsq > 3)
290 0 1 if ($lettsq > 3)
291 1 0 if ($type == $TYPE_NEWLINE) { }
0 0 elsif ($type == $TYPE_INDENT) { }
0 0 elsif ($type == $TYPE_INDENT_OTHER) { }
0 0 elsif ($type == $TYPE_NUMBER) { }
0 0 elsif ($type == $TYPE_NUMBERSQ) { }
0 0 elsif ($type eq $TYPE_LETTERSQ) { }
293 0 1 if $Biblio::Document::Parser::Standard::DEBUG
294 1 0 $indmin > 5 ? :
297 3 3 if (/^\s*$/) { }
0 3 elsif (/^\s{$indmin}/) { }
299 2 1 if ($curr_ref)
306 0 0 if (not $curr_ref and @ref_table)
314 0 3 if ($curr_ref =~ m[http://\S+$]) { }
320 1 0 if ($curr_ref)
324 0 0 if $Biblio::Document::Parser::Standard::DEBUG
327 0 0 if (/^(\s*)\b/ and length $1 == $indmin) { }
329 0 0 if ($curr_ref)
336 0 0 if ($curr_ref =~ m[http://\S+$]) { }
343 0 0 if ($curr_ref)
347 0 0 if $Biblio::Document::Parser::Standard::DEBUG
350 0 0 if (not $curr_ref) { }
0 0 elsif (/^(\s*)\S/ and _within(length $1, $indmax, 2)) { }
354 0 0 if ($curr_ref =~ s/(?<=\w)\-\s*$//) { }
363 0 0 if ($curr_ref =~ m[http://\S+$]) { }
370 0 0 if ($curr_ref)
375 0 0 if ($curr_ref)
379 0 0 if $Biblio::Document::Parser::Standard::DEBUG
384 0 0 if (/^(\d+)\.?(([\s_]{8}\s*[,a;])|\s+[[:alnum:]_]).+$/ and $1 == $lastnum + 1) { }
386 0 0 if ($curr_ref)
393 0 0 if ($curr_ref =~ m[http://\S+$]) { }
400 0 0 if ($curr_ref)
404 0 0 if $Biblio::Document::Parser::Standard::DEBUG
410 0 0 if (/^\s*[\(\[](\d+)[\]\)]\s.+$/s and $1 == $lastnum + 1) { }
0 0 elsif (/^\s*$/) { }
0 0 elsif ($curr_ref) { }
412 0 0 if $curr_ref
418 0 0 if ($curr_ref)
423 0 0 if ($curr_ref =~ m[http://\S+$]) { }
431 0 0 if $curr_ref
435 0 0 if $Biblio::Document::Parser::Standard::DEBUG
440 0 0 if (/^\s*[\(\[](\w+)[\]\)]\s.+$/s) { }
0 0 elsif (/^\s*$/) { }
0 0 elsif ($curr_ref) { }
442 0 0 if $curr_ref
447 0 0 if ($curr_ref)
452 0 0 if ($curr_ref =~ m[http://\S+$]) { }
460 0 0 if $curr_ref
471 0 3 if $prev_author
472 0 3 if (/^(?:(?:[\(\[]\w+[\)\]])|(?:\d{1,3}\.))\s*([^,]+?)(?:,|and)/) { }
497 6 9 if length $_ == 0 or $_ =~ tr/ // / length($_) > 0.75
502 7 82 $_ == 32 ? :
509 18 5 unless defined $lens[$i]
510 1 4 if $lens[$i] > $lens[$avelen]
515 2 17 if ($bitsout[$i] > $max)
519 1 0 if ($center - 6 <= $maxpoint and $center + 6 >= $maxpoint) { }
528 0 1 if $doc =~ /\f/s
535 0 1 if (%HEADERS) { }
538 0 0 if ($HEADERS{$regexp} > 3) { }