Branch Coverage

blib/lib/Text/Contraction.pm
Criterion Covered Total %
branch 30 54 55.5


line true false branch
17 10 1 unless exists $$this{'prefix'}
18 10 1 unless exists $$this{'caseless'}
19 10 1 unless exists $$this{'minRatio'}
20 0 11 unless exists $$this{'words'}
27 0 0 if (@_)
35 1 0 if (@_)
43 0 0 if (@_)
45 0 0 unless ($minRatio >= 0 and $minRatio <= 1)
55 1 0 if (@_)
57 0 1 unless (ref $words eq 'ARRAY')
69 0 0 if @words
77 0 0 if (defined $file and -s $file)
78 0 0 unless open my $fh, $file
84 0 0 if (defined $ENV{'CONTRACTION_WORDS'}) { }
85 0 0 if (-e $ENV{'CONTRACTION_WORDS'}) { }
101 23 2 $$this{'caseless'} ? :
117 13 2 if ($$this{'caseless'}) { }
124 11 4 unless $$this{'_words'}
133 22 0 if ($$this{'minRatio'} > 0)
141 37 15 if $_
142 0 52 if defined $bestScore and $score > $bestScore
145 17 5 if ($score > 0 and !defined($bestScore) || $score < $bestScore)
152 15 0 if ($$this{'minRatio'} > 0)
163 26 3 if $_
167 15 0 if ($$this{'minRatio'} > 0)
170 25 2 if length $_ <= $maxLength
173 29 8 $_[0] < $_[1] ? :