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 &Lingua::EN::Numbers::DEBUG
47 0 6 unless defined $_[0] and length $_[0]
51 0 6 unless $x
52 0 6 unless $x =~ s/(\w+)$//s
65 2 84 unless defined $x and length $x
67 0 84 if $x eq 'NaN'
68 0 84 if $x =~ /^\+inf(?:inity)?$/is
69 0 84 if $x =~ /^\-inf(?:inity)?$/is
70 0 84 if $x =~ /^inf(?:inity)?$/is
72 30 54 if exists $D{$x}
75 5 49 if defined $e
82 13 36 if $x =~ s/^([-+])//s
85 33 16 if ($x =~ /^[0-9]+$/) { }
9 7 elsif ($x =~ /^([0-9]+)\.([0-9]+)$/) { }
3 4 elsif ($x =~ /^\.([0-9]+)$/) { }
106 32 13 unless defined $_[0] and length $_[0]
107 9 4 if $_[0] eq '-'
108 4 0 if $_[0] eq '+'
113 33 12 unless defined $_[0] and length $_[0]
122 0 71 unless defined $_[0] and length $_[0] and $_[0] =~ /^[0-9]+$/s
127 28 43 if defined $D{$x}
129 23 20 if ($x =~ /^(.)(.)$/) { }
11 9 elsif ($x =~ /^(.)(..)$/) { }
136 1 10 if $rest eq '00'
146 0 9 unless defined $_[0] and length $_[0] and $_[0] =~ /^[0-9]+$/s
158 19 4 if $num
161 0 9 unless @chunks
166 6 3 if $chunks[-1][1] == 0 and $chunks[-1][0] < 100
176 6 3 if ($and and @chunks > 1)
181 1 8 if @chunks == 2 and not $and
189 0 9 unless @$chunks
192 19 0 if $c->[0]
201 7 12 unless $multnum
203 12 0 if $Mult{$multnum}
221 5 49 if ($x =~ / ^( [-+]? # leading sign (?: [0-9,]+ | [0-9,]*\.[0-9]+ # number ) ) [eE] ([-+]?[0-9]+) # mantissa, has to be an integer $ /x) { }