File Coverage

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