line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::RU::Numeric::Declension; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
72289
|
use vars qw ($VERSION); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
141
|
|
4
|
|
|
|
|
|
|
$VERSION = '1.1'; |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
503
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Exporter; |
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
our @EXPORT_OK = qw(numdecl); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub numdecl { |
14
|
1201
|
|
|
1201
|
0
|
607355
|
my ($number, $nominative, $genitive, $plural) = @_; |
15
|
|
|
|
|
|
|
|
16
|
1201
|
100
|
|
|
|
7006
|
return $plural if $number =~ /1.$/; |
17
|
|
|
|
|
|
|
|
18
|
1081
|
|
|
|
|
5084
|
my ($last_digit) = $number =~ /(.)$/; |
19
|
|
|
|
|
|
|
|
20
|
1081
|
100
|
|
|
|
5463
|
return $nominative if $last_digit == 1; |
21
|
973
|
100
|
100
|
|
|
8030
|
return $genitive if $last_digit > 0 && $last_digit < 5; |
22
|
649
|
|
|
|
|
5215
|
return $plural; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |