Branch Coverage

blib/lib/Lingua/ID/Words2Nums.pm
Criterion Covered Total %
branch 42 60 70.0


line true false branch
176 4 42 if ($words =~ /(.+)\s+$Exp_pat\s+(.+)/) { }
181 0 4 unless defined $num1 and defined $num2
186 0 42 unless defined $num1
196 8 42 if ($words =~ /^\s*$Neg_pat\s+(.+)/) { }
1 41 elsif ($words =~ /^\s*$Pos_pat\s+(.+)/) { }
199 0 8 unless defined $num1
205 0 1 unless defined $num1
211 0 41 unless defined $num1
221 8 42 if ($words =~ /(.+)\s+$Dec_pat\s+(.+)/) { }
226 0 8 unless defined $num1 and defined $num2
231 0 42 unless defined $num1
246 0 50 if $words[0] eq 'ERR'
250 65 72 if (defined $Digits{$w}) { }
14 58 elsif (&looks_like_number($w)) { }
6 52 elsif ($w =~ /^$Teen_pat$/) { }
253 65 0 unless ($seen_digits and do { push @nums, 10 * pop(@nums) + $Digits{$w} })
258 0 14 if $seen_digits
265 0 6 unless $seen_digits
272 0 52 unless defined $Mults{$w}
273 0 52 unless @nums
279 19 33 if ($a > $Mults{$w})
299 0 15 if $words[0] eq 'ERR'
303 4 34 if (&looks_like_number($w)) { }
306 0 34 unless defined $Digits{$w}
324 18 136 if ($w =~ /^([-+]?[0-9.,]+(?:[Ee][+-]?\d+)?)(\D?.*)$/) { }
18 118 elsif ($w =~ /^($Se_pat)($Mult_pat)$/ and defined $Words{$1}) { }
0 118 elsif ($w =~ /^(.+)\s+($Mult_pat)$/ and defined $Words{$1}) { }
118 0 elsif (defined $Words{$w}) { }
328 0 18 unless (defined $n)
333 3 15 if length $w2