Branch Coverage

blib/lib/Text/Reflow.pm
Criterion Covered Total %
branch 97 160 60.6


line true false branch
81 0 0 if $k < $j and $interval > $opt + 10 || $interval >= $maximum
85 0 0 if $k > 0
87 0 0 if ($penalty < $totalpenalty[$j])
100 0 0 if $interval > $opt + 10 or $interval > $maximum
101 0 0 if ($interval > $opt) { }
107 0 0 if $k >= 0
108 0 0 if $wordcount - $k - 1 <= 2
109 0 0 if ($penalty <= $bestsofar)
115 0 0 if ($bestsofar < $best)
235 0 4 if $from eq ''
236 0 4 if $to eq ''
237 0 4 ref $from ? :
242 0 4 ref $to ? :
251 0 4 if ($from_a_handle) { }
257 0 4 if $from =~ /^\s/s
258 0 4 unless open FROM, "< $from\000"
259 0 4 unless binmode FROM
263 0 4 if ($to_a_handle) { }
269 0 4 if $to =~ /^\s/s
270 0 4 unless open TO, "> $to\000"
271 0 4 unless binmode TO
279 4 0 if $closeto
280 4 0 if $closefrom
291 11 0 if $Text::Reflow::from[$#Text::Reflow::from] eq ''
322 0 19 if $Text::Reflow::optimum =~ /^\d+$/
325 0 60 unless @opts
327 0 60 unless $Text::Reflow::keys{$key}
328 0 60 unless $value =~ /^$Text::Reflow::keys{$key}$/
331 1 59 if ($key eq 'indent') { }
14 45 elsif ($key eq 'optimum') { }
335 0 14 if ($value =~ /^\d+$/) { }
0 14 elsif (ref $value ne 'ARRAY') { }
342 14 46 if (ref ${$key;} eq 'ARRAY') { }
350 3 16 if ($Text::Reflow::indent2 ne '')
371 144 511 if ($Text::Reflow::IO_Files) { }
376 19 636 unless defined $line
381 39 597 if ($quote_ns =~ s/\s+$//)
382 7 32 if $line =~ /^$quote_ns$/
392 69 220 if ($Text::Reflow::IO_Files) { }
402 4 15 if ($Text::Reflow::skipto ne '')
405 4 54 if $line =~ /^$Text::Reflow::skipto/
407 0 4 unless defined $line
410 1 18 if ($Text::Reflow::oneparagraph =~ /[Yy]/) { }
3 15 elsif ($Text::Reflow::skipindented < 2) { }
418 21 84 if ($Text::Reflow::skipindented and $line =~ /^($Text::Reflow::pin|\t).*\S/ or $Text::Reflow::noreflow ne '' and $line =~ /$Text::Reflow::noreflow/) { }
432 0 369 if ($Text::Reflow::noreflow ne '' and $line =~ /$Text::Reflow::noreflow/) { }
39 330 elsif ($line =~ /^($Text::Reflow::pin|\t).*\S/) { }
441 0 39 unless (defined $line)
445 10 29 if ($line =~ /^($Text::Reflow::pin|\t).*\S/) { }
452 10 0 unless $line =~ /^($Text::Reflow::pin|\t).*\S/ or $Text::Reflow::noreflow ne '' and $line =~ /$Text::Reflow::noreflow/
456 0 10 unless defined $line
485 36 481 if @Text::Reflow::linewords and $Text::Reflow::linewords[0] eq ''
488 0 408 if (@Text::Reflow::linewords and @Text::Reflow::words and $Text::Reflow::words[$#Text::Reflow::words] =~ /[a-zA-Z0-9]-$/)
491 109 408 if ($#Text::Reflow::linewords == -1) { }
493 102 7 if (not $Text::Reflow::oneparagraph =~ /[Yy]/)
502 0 408 if ($#Text::Reflow::words >= 0 and $Text::Reflow::linewords[0] =~ s/^--[^a-zA-Z0-9]*//)
504 0 0 if $Text::Reflow::linewords[0] eq ''
508 65 4480 if ($word =~ /[^-]--[a-zA-Z0-9]/) { }
526 84 68 unless @Text::Reflow::words
541 582 4096 $_ > 4026531840 ? :
555 68 0 if $Text::Reflow::wordcount
560 187 4423 if ($Text::Reflow::words[$j] =~ /^([A-Za-z0-9-]+)["')]*([\.\:])["')]*$/)
561 187 0 if (not defined $Text::Reflow::abbrev{$1} or $2 eq ':') { }
563 187 0 if $j > 0
565 176 11 unless $Text::Reflow::frenchspacing =~ /[Yy]/
568 0 0 if $Text::Reflow::abbrev{$1} == 1
571 0 0 if ($Text::Reflow::words[$j] =~ /[\?\!]["')]*$/ and $j >= $#Text::Reflow::words || $Text::Reflow::words[$j + 1] =~ /^[^a-zA-Z]*[A-Z]/)
574 0 0 if $j > 0
576 0 0 unless $Text::Reflow::frenchspacing =~ /[Yy]/
578 246 4364 if ($Text::Reflow::words[$j] =~ /\,$/)
580 246 0 if $j > 0
583 178 4432 if ($Text::Reflow::words[$j] =~ /[\;\"\'\)]$|--$/)
585 178 0 if $j > 0
588 1 4609 if ($j < $#Text::Reflow::words and $Text::Reflow::words[$j + 1] =~ /^\(/)
591 1 0 if $j > 0
594 78 434 if ($j < $#Text::Reflow::words and ($Text::Reflow::words[$j] =~ /[A-Z]/ and not $Text::Reflow::words[$j] =~ /\./ and $Text::Reflow::words[$j + 1] =~ /[A-Z]/))
600 1573 3037 if defined $Text::Reflow::connectives{$Text::Reflow::words[$j]}
606 66 4544 if ($Text::Reflow::words[$j] =~ /--$/) { }
176 4368 elsif ($Text::Reflow::words[$j] =~ / $/) { }
618 68 0 if $Text::Reflow::wordcount