File Coverage

blib/lib/Locale/CLDR/Locales/Pt/Any/Mo.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
4              
5             Locale::CLDR::Locales::Pt::Any::Mo - Package for language Portuguese
6              
7             =cut
8              
9             # This file auto generated from Data/common/main/pt_MO.xml
10             # on Mon 11 Apr 5:36:40 pm GMT
11              
12             use strict;
13 1     1   917 use warnings;
  1         2  
  1         25  
14 1     1   4 use version;
  1         2  
  1         20  
15 1     1   4  
  1         2  
  1         5  
16             our $VERSION = version->declare('v0.34.1');
17              
18             use v5.10.1;
19 1     1   80 use mro 'c3';
  1         2  
20 1     1   5 use utf8;
  1         1  
  1         6  
21 1     1   32 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         1  
  1         6  
22 1     1   26 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         10  
23 1     1   99 use Moo;
  1         2  
  1         6  
24 1     1   869  
  1         2  
  1         5  
25             extends('Locale::CLDR::Locales::Pt::Any::Pt');
26             has 'currencies' => (
27             is => 'ro',
28             isa => HashRef,
29             init_arg => undef,
30             default => sub { {
31             'MOP' => {
32             symbol => 'MOP$',
33             },
34             } },
35             );
36              
37              
38             has 'day_period_data' => (
39             is => 'ro',
40             isa => CodeRef,
41             init_arg => undef,
42             default => sub { sub {
43             # Time in hhmm format
44             my ($self, $type, $time, $day_period_type) = @_;
45             $day_period_type //= 'default';
46             SWITCH:
47             for ($type) {
48             if ($_ eq 'gregorian') {
49             if($day_period_type eq 'default') {
50             return 'midnight' if $time == 0;
51             return 'noon' if $time == 1200;
52             return 'afternoon1' if $time >= 1200
53             && $time < 1900;
54             return 'evening1' if $time >= 1900
55             && $time < 2400;
56             return 'morning1' if $time >= 600
57             && $time < 1200;
58             return 'night1' if $time >= 0
59             && $time < 600;
60             }
61             if($day_period_type eq 'selection') {
62             return 'afternoon1' if $time >= 1200
63             && $time < 1900;
64             return 'evening1' if $time >= 1900
65             && $time < 2400;
66             return 'morning1' if $time >= 600
67             && $time < 1200;
68             return 'night1' if $time >= 0
69             && $time < 600;
70             }
71             last SWITCH;
72             }
73             }
74             } },
75             );
76              
77             around day_period_data => sub {
78             my ($orig, $self) = @_;
79             return $self->$orig;
80             };
81              
82             has 'eras' => (
83             is => 'ro',
84             isa => HashRef,
85             init_arg => undef,
86             default => sub { {
87             'gregorian' => {
88             },
89             } },
90             );
91              
92             has 'date_formats' => (
93             is => 'ro',
94             isa => HashRef,
95             init_arg => undef,
96             default => sub { {
97             'gregorian' => {
98             },
99             } },
100             );
101              
102             has 'time_formats' => (
103             is => 'ro',
104             isa => HashRef,
105             init_arg => undef,
106             default => sub { {
107             'gregorian' => {
108             'full' => q{h:mm:ss a zzzz},
109             'long' => q{h:mm:ss a z},
110             'medium' => q{h:mm:ss a},
111             'short' => q{h:mm a},
112             },
113             } },
114             );
115              
116             has 'datetime_formats' => (
117             is => 'ro',
118             isa => HashRef,
119             init_arg => undef,
120             default => sub { {
121             'gregorian' => {
122             },
123             } },
124             );
125              
126             has 'datetime_formats_available_formats' => (
127             is => 'ro',
128             isa => HashRef,
129             init_arg => undef,
130             default => sub { {
131             } },
132             );
133              
134             has 'datetime_formats_append_item' => (
135             is => 'ro',
136             isa => HashRef,
137             init_arg => undef,
138             default => sub { {
139             } },
140             );
141              
142             has 'datetime_formats_interval' => (
143             is => 'ro',
144             isa => HashRef,
145             init_arg => undef,
146             default => sub { {
147             } },
148             );
149              
150             has 'time_zone_names' => (
151             is => 'ro',
152             isa => HashRef,
153             init_arg => undef,
154             default => sub { {
155             'Azores' => {
156             short => {
157             'daylight' => q#∅∅∅#,
158             'generic' => q#∅∅∅#,
159             'standard' => q#∅∅∅#,
160             },
161             },
162             'Europe_Central' => {
163             short => {
164             'daylight' => q#∅∅∅#,
165             'generic' => q#∅∅∅#,
166             'standard' => q#∅∅∅#,
167             },
168             },
169             'Europe_Eastern' => {
170             short => {
171             'daylight' => q#∅∅∅#,
172             'generic' => q#∅∅∅#,
173             'standard' => q#∅∅∅#,
174             },
175             },
176             'Europe_Western' => {
177             short => {
178             'daylight' => q#∅∅∅#,
179             'generic' => q#∅∅∅#,
180             'standard' => q#∅∅∅#,
181             },
182             },
183             } }
184             );
185             no Moo;
186 1     1   880  
  1         1  
  1         5  
187             1;
188              
189             # vim: tabstop=4