File Coverage

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