line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Locales::DB::CharacterOrientation::Tiny; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# Auto generated from CLDR |
7
|
1
|
|
|
1
|
|
4
|
use if $Locales::_UNICODE_STRINGS, 'utf8'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$Locales::DB::CharacterOrientation::Tiny::VERSION = '0.09'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$Locales::DB::CharacterOrientation::Tiny::cldr_version = '2.0'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my %rtl = ( |
14
|
|
|
|
|
|
|
'ur' => '', |
15
|
|
|
|
|
|
|
'ku' => '', |
16
|
|
|
|
|
|
|
'he' => '', |
17
|
|
|
|
|
|
|
'fa' => '', |
18
|
|
|
|
|
|
|
'ps' => '', |
19
|
|
|
|
|
|
|
'ar' => '', |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub get_orientation { |
23
|
6
|
100
|
|
6
|
0
|
15
|
if ( exists $rtl{ $_[0] } ) { |
24
|
3
|
|
|
|
|
14
|
return 'right-to-left'; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
else { |
27
|
3
|
|
|
|
|
14
|
require Locales; |
28
|
3
|
|
|
|
|
7
|
my ($l) = Locales::split_tag( $_[0] ); |
29
|
3
|
50
|
|
|
|
8
|
if ( $l ne $_[0] ) { |
30
|
0
|
0
|
|
|
|
0
|
return 'right-to-left' if exists $rtl{$l}; |
31
|
|
|
|
|
|
|
} |
32
|
3
|
|
|
|
|
14
|
return 'left-to-right'; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |