File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Cm.pm
Criterion Covered Total %
statement 29 29 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 39 39 100.0


line stmt bran cond sub pod time code
1             =encoding utf8
2              
3             =head1 NAME
4              
5             Locale::CLDR::Locales::En::Any::Cm - Package for language English
6              
7             =cut
8              
9             package Locale::CLDR::Locales::En::Any::Cm;
10             # This file auto generated from Data\common\main\en_CM.xml
11             # on Fri 13 Oct 9:13:16 am GMT
12              
13 1     1   899 use strict;
  1         2  
  1         25  
14 1     1   4 use warnings;
  1         2  
  1         20  
15 1     1   4 use version;
  1         2  
  1         5  
16              
17             our $VERSION = version->declare('v0.34.2');
18              
19 1     1   98 use v5.10.1;
  1         3  
20 1     1   6 use mro 'c3';
  1         2  
  1         11  
21 1     1   32 use utf8;
  1         1  
  1         4  
22 1     1   27 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         10  
23 1     1   105 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         6  
24 1     1   942 use Moo;
  1         2  
  1         5  
25              
26             extends('Locale::CLDR::Locales::En::Any::001');
27             has 'day_period_data' => (
28             is => 'ro',
29             isa => CodeRef,
30             init_arg => undef,
31             default => sub { sub {
32             # Time in hhmm format
33             my ($self, $type, $time, $day_period_type) = @_;
34             $day_period_type //= 'default';
35             SWITCH:
36             for ($type) {
37             if ($_ eq 'gregorian') {
38             if($day_period_type eq 'default') {
39             return 'midnight' if $time == 0;
40             return 'noon' if $time == 1200;
41             return 'afternoon1' if $time >= 1200
42             && $time < 1800;
43             return 'evening1' if $time >= 1800
44             && $time < 2100;
45             return 'morning1' if $time >= 600
46             && $time < 1200;
47             return 'night1' if $time >= 2100;
48             return 'night1' if $time < 600;
49             }
50             if($day_period_type eq 'selection') {
51             return 'afternoon1' if $time >= 1200
52             && $time < 1800;
53             return 'evening1' if $time >= 1800
54             && $time < 2100;
55             return 'morning1' if $time >= 600
56             && $time < 1200;
57             return 'night1' if $time >= 2100;
58             return 'night1' if $time < 600;
59             }
60             last SWITCH;
61             }
62             }
63             } },
64             );
65              
66             around day_period_data => sub {
67             my ($orig, $self) = @_;
68             return $self->$orig;
69             };
70              
71             has 'eras' => (
72             is => 'ro',
73             isa => HashRef,
74             init_arg => undef,
75             default => sub { {
76             'gregorian' => {
77             },
78             } },
79             );
80              
81             has 'date_formats' => (
82             is => 'ro',
83             isa => HashRef,
84             init_arg => undef,
85             default => sub { {
86             'gregorian' => {
87             },
88             } },
89             );
90              
91             has 'time_formats' => (
92             is => 'ro',
93             isa => HashRef,
94             init_arg => undef,
95             default => sub { {
96             'gregorian' => {
97             'full' => q{HH:mm:ss zzzz},
98             'long' => q{HH:mm:ss z},
99             'medium' => q{HH:mm:ss},
100             'short' => q{HH:mm},
101             },
102             } },
103             );
104              
105             has 'datetime_formats' => (
106             is => 'ro',
107             isa => HashRef,
108             init_arg => undef,
109             default => sub { {
110             'gregorian' => {
111             },
112             } },
113             );
114              
115             has 'datetime_formats_available_formats' => (
116             is => 'ro',
117             isa => HashRef,
118             init_arg => undef,
119             default => sub { {
120             } },
121             );
122              
123             has 'datetime_formats_append_item' => (
124             is => 'ro',
125             isa => HashRef,
126             init_arg => undef,
127             default => sub { {
128             } },
129             );
130              
131             has 'datetime_formats_interval' => (
132             is => 'ro',
133             isa => HashRef,
134             init_arg => undef,
135             default => sub { {
136             } },
137             );
138              
139             has 'time_zone_names' => (
140             is => 'ro',
141             isa => HashRef,
142             init_arg => undef,
143             default => sub { {
144             'Africa_Central' => {
145             short => {
146             'standard' => q#CAT#,
147             },
148             },
149             'Africa_Eastern' => {
150             short => {
151             'standard' => q#EAT#,
152             },
153             },
154             'Africa_Southern' => {
155             short => {
156             'standard' => q#SAST#,
157             },
158             },
159             'Africa_Western' => {
160             short => {
161             'daylight' => q#WAST#,
162             'generic' => q#WAT#,
163             'standard' => q#WAT#,
164             },
165             },
166             } }
167             );
168 1     1   857 no Moo;
  1         2  
  1         4  
169              
170             1;
171              
172             # vim: tabstop=4