line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::Conlang::Numbers; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
27580
|
use 5.008_001; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
5
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
29
|
|
6
|
1
|
|
|
1
|
|
663
|
use Lingua::EO::Numbers qw( :all ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
168
|
|
7
|
1
|
|
|
1
|
|
12469
|
use Lingua::JBO::Numbers qw( :all ); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
158
|
|
8
|
1
|
|
|
1
|
|
631
|
use Lingua::TLH::Numbers qw( :all ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
126
|
|
9
|
1
|
|
|
1
|
|
834
|
use Lingua::TokiPona::Numbers qw( :all ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
149
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
6
|
use base qw( Exporter ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
376
|
|
12
|
|
|
|
|
|
|
our @EXPORT_OK = qw( num2conlang num2conlang_ordinal num2conlang_languages ); |
13
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( all => \@EXPORT_OK ); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my @languages = qw< eo jbo tlh tokipona >; |
18
|
|
|
|
|
|
|
my %aliases = ( |
19
|
|
|
|
|
|
|
esperanto => 'eo', |
20
|
|
|
|
|
|
|
klingon => 'tlh', |
21
|
|
|
|
|
|
|
lojban => 'jbo', |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
19
|
|
|
19
|
1
|
4519
|
sub num2conlang { _num2conlang(q{}, @_) } |
25
|
5
|
|
|
5
|
1
|
1634
|
sub num2conlang_ordinal { _num2conlang(q{_ordinal}, @_) } |
26
|
2
|
|
|
2
|
1
|
7
|
sub num2conlang_languages { @languages } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _num2conlang { |
29
|
|
|
|
|
|
|
# @_ will be used with goto |
30
|
24
|
|
|
24
|
|
41
|
my ($suffix, $language, $number) = (shift, shift, @_); |
31
|
|
|
|
|
|
|
|
32
|
24
|
100
|
|
|
|
56
|
return unless $language; |
33
|
21
|
|
|
|
|
30
|
$language = lc $language; |
34
|
21
|
|
|
|
|
26
|
$language =~ tr{ _}{}d; |
35
|
|
|
|
|
|
|
|
36
|
21
|
100
|
|
|
|
32
|
if (grep { $_ eq $language } @languages) { |
|
84
|
100
|
|
|
|
147
|
|
37
|
18
|
|
|
|
|
18
|
goto &{ 'num2' . $language . $suffix }; |
|
18
|
|
|
|
|
95
|
|
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
elsif ( exists $aliases{$language} ) { |
40
|
2
|
|
|
|
|
2
|
goto &{ 'num2' . $aliases{$language} . $suffix }; |
|
2
|
|
|
|
|
10
|
|
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
else { |
43
|
1
|
|
|
|
|
6
|
return; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |