File Coverage

lib/Locales/DB/CharacterOrientation/Tiny.pm
Criterion Covered Total %
statement 15 16 93.7
branch 3 6 50.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 22 27 81.4


line stmt bran cond sub pod time code
1             package Locales::DB::CharacterOrientation::Tiny;
2              
3 1     1   5 use strict;
  1         2  
  1         27  
4 1     1   5 use warnings;
  1         2  
  1         34  
5              
6             # Auto generated from CLDR
7 1     1   5 use if $Locales::_UNICODE_STRINGS, 'utf8';
  1         2  
  1         6  
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 18 if ( exists $rtl{ $_[0] } ) {
24 3         17 return 'right-to-left';
25             }
26             else {
27 3         14 require Locales;
28 3         9 my ($l) = Locales::split_tag( $_[0] );
29 3 50       9 if ( $l ne $_[0] ) {
30 0 0       0 return 'right-to-left' if exists $rtl{$l};
31             }
32 3         17 return 'left-to-right';
33             }
34             }
35              
36             1;