Branch Coverage

blib/lib/Lingua/RU/Numeral.pm
Criterion Covered Total %
branch 104 146 71.2


line true false branch
64 1498 0 $gender =~ /^\s*(m|f|n)/i ? :
67 1498 0 $case =~ /^\s*([ngdaip])/i ? :
70 116 1382 $multi =~ /^\s*[p1-9]/i ? :
73 166 1332 $object =~ /^\s*[a1-9]/i ? :
81 42 1456 unless ($number)
82 1 41 exists $cfg{'alt'}{'0'} ? :
85 3 39 $case =~ /^a/i && $object =~ /^animate/i ? :
94 13 29 if $epilog and exists $epilog->{'root'}
96 5 37 if exists $cfg{'ucfirst'}
101 1 1455 if length $number > 15
115 529 2857 if ($number =~ /^.$/)
116 195 334 unless $number
120 26 282 $case =~ /^a/i && $object =~ /^animate/i ? :
26 308 $multi =~ /^plural/i && $number == 1 ? :
123 92 242 if ($epilog and exists $epilog->{'root'})
124 59 33 $number < 5 ? :
133 1127 1730 if ($i < 2) { }
144 694 2163 if (length($number) % 3 == 0)
146 458 236 if $&
150 1006 1157 if (length($number) % 3 == 2)
151 181 825 if ($number =~ /^1/) { }
153 181 0 if $&
155 34 147 if length $Power->[$i]
159 288 537 if $&
165 1157 0 if (length($number) % 3 == 1)
168 790 367 if ($d)
169 88 702 $multi =~ /^plural/i && $d == 1 ? :
172 1028 129 unless ($s[-1] =~ /^(?:\x{43c}|\x{442}\x{440}\x{438}\x{43b})/)
174 23 65 $i < 2 ? :
88 940 $multi =~ /^plural/i && $d == 1 ? :
180 779 378 if $number =~ /^0+$/
187 89 1366 if exists $cfg{'ucfirst'}
190 212 1243 if ($epilog and exists $epilog->{'root'})
193 108 66 $s[-1] =~ /^(?:\x{43c}|\x{442}\x{440}\x{438}\x{43b})/ ? :
38 174 $s[-1] =~ /^\x{442}\x{44b}/ ? :
432 1244 1666 if exists $gg{$g}
439 4040 29280 if $case =~ /^a/i and $object =~ /^animate/i
445 5 342 if ($case =~ /^a/i and $object =~ /^animate/i and $multi =~ /^plural/i)
458 1342 155 if not @$prolog && @$s or ~~@$prolog < 2 and not defined $prolog->[0] && length $prolog->[0]
464 0 131 unless $_
467 0 131 unless $k and $m
469 43 88 if ($s->[0] =~ /^$m/)
477 112 43 if (defined $p and length $p)
490 1062 130 if (ref $prolog eq "ARRAY")
491 25 1037 ~~@$prolog ? :
494 0 130 if (ref $prolog eq "HASH")
497 0 0 if (defined $prolog->{$k} and length $prolog->{$k}) { }
504 0 0 ~~@p ? :
507 130 0 if (ref \$prolog eq "SCALAR")
508 65 65 if $prolog =~ /^[oO\x{43e}\x{41e}]$/
509 65 0 if $prolog =~ /^[cC\x{441}\x{421}]$/
510 0 0 if $prolog =~ /^[B\x{432}\x{412}]$/
519 77 1421 unless my $epilog = $cfg->{'epilog'}
521 309 1112 if (ref \$epilog eq 'SCALAR') { }
8 1104 elsif (ref $epilog eq 'HASH' and exists $epilog->{'root'} and exists $epilog->{'ends'}) { }
524 149 160 if ($epilog =~ /^(?:RUB|643)$/) { }
160 0 elsif ($epilog =~ /^(?:rub|\-643)$/) { }
0 0 elsif ($epilog =~ /^(?:USD|840)$/) { }
0 0 elsif ($epilog =~ /^(?:usd|\-840)$/) { }
0 0 elsif ($epilog =~ /^(?:CNY|156)$/) { }
0 0 elsif ($epilog =~ /^year$/i) { }
0 0 elsif ($epilog =~ /^month$/i) { }
0 0 elsif ($epilog =~ /^day$/i) { }
0 0 elsif ($epilog =~ /^hour$/i) { }
0 0 elsif ($epilog =~ /^min\.$/i) { }
0 0 elsif ($epilog =~ /^sec\.$/i) { }
0 0 elsif ($epilog =~ /^meter$/i) { }
0 0 elsif ($epilog =~ /^stamp$/i) { }
749 309 0 if (%eRef) { }
754 62 247 if $multi =~ /^plural/i
766 8 0 if (exists $epilog->{'object'})
767 0 8 $epilog->{'object'} =~ /^\s*[a1-9]/i ? :
771 8 0 if exists $epilog->{'gender'} and $epilog->{'gender'} =~ /^\s*(m|f|n)/i