Branch Coverage

blib/lib/Lingua/EN/Numbers.pm
Criterion Covered Total %
branch 55 70 78.5


line true false branch
10 4 0 unless defined &DEBUG
49 0 6 unless defined $_[0] and length $_[0]
53 0 6 unless $x
54 0 6 unless $x =~ s/(\w+)$//s
67 2 84 unless defined $x and length $x
69 0 84 if $x eq 'NaN'
70 0 84 if $x =~ /^\+inf(?:inity)?$/is
71 0 84 if $x =~ /^\-inf(?:inity)?$/is
72 0 84 if $x =~ /^inf(?:inity)?$/is
74 30 54 if exists $Lingua::EN::Numbers::D{$x}
77 5 49 if defined $e
84 13 36 if $x =~ s/^([-+])//s
87 33 16 if ($x =~ /^\d+$/) { }
9 7 elsif ($x =~ /^(\d+)\.(\d+)$/) { }
3 4 elsif ($x =~ /^\.(\d+)$/) { }
108 32 13 unless defined $_[0] and length $_[0]
109 9 4 if $_[0] eq '-'
110 4 0 if $_[0] eq '+'
115 33 12 unless defined $_[0] and length $_[0]
124 0 71 unless defined $_[0] and length $_[0] and $_[0] =~ /^\d+$/s
129 28 43 if defined $Lingua::EN::Numbers::D{$x}
131 23 20 if ($x =~ /^(.)(.)$/) { }
11 9 elsif ($x =~ /^(.)(..)$/) { }
138 1 10 if $rest eq '00'
148 0 9 unless defined $_[0] and length $_[0] and $_[0] =~ /^\d+$/s
160 19 4 if $num
163 0 9 unless @chunks
168 6 3 if $chunks[-1][1] == 0 and $chunks[-1][0] < 100
178 6 3 if ($and and @chunks > 1)
183 1 8 if @chunks == 2 and not $and
191 0 9 unless @$chunks
194 19 0 if $$c[0]
203 7 12 unless $multnum
205 12 0 if $Lingua::EN::Numbers::Mult{$multnum}
223 5 49 if ($x =~ / ^( [-+]? # leading sign (?: [\d,]+ | [\d,]*\.\d+ # number ) ) [eE] ([-+]?\d+) # mantissa, has to be an integer $ /x) { }