File Coverage

blib/lib/Number/Phone/StubCountry/GY.pm
Criterion Covered Total %
statement 17 17 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 25 25 100.0


line stmt bran cond sub pod time code
1             # automatically generated file, don't edit
2              
3              
4              
5             # Copyright 2023 David Cantrell, derived from data from libphonenumber
6             # http://code.google.com/p/libphonenumber/
7             #
8             # Licensed under the Apache License, Version 2.0 (the "License");
9             # you may not use this file except in compliance with the License.
10             # You may obtain a copy of the License at
11             #
12             # http://www.apache.org/licenses/LICENSE-2.0
13             #
14             # Unless required by applicable law or agreed to in writing, software
15             # distributed under the License is distributed on an "AS IS" BASIS,
16             # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17             # See the License for the specific language governing permissions and
18             # limitations under the License.
19             package Number::Phone::StubCountry::GY;
20 2     2   1245 use base qw(Number::Phone::StubCountry);
  2         8  
  2         247  
21              
22 2     2   16 use strict;
  2         5  
  2         53  
23 2     2   12 use warnings;
  2         6  
  2         57  
24 2     2   12 use utf8;
  2         6  
  2         15  
25             our $VERSION = 1.20230614174403;
26              
27             my $formatters = [
28             {
29             'format' => '$1 $2',
30             'leading_digits' => '[2-46-9]',
31             'pattern' => '(\\d{3})(\\d{4})'
32             }
33             ];
34              
35             my $validators = {
36             'fixed_line' => '
37             (?:
38             2(?:
39             1[6-9]|
40             2[0-35-9]|
41             3[1-4]|
42             5[3-9]|
43             6\\d|
44             7[0-24-79]
45             )|
46             3(?:
47             2[25-9]|
48             3\\d
49             )|
50             4(?:
51             4[0-24]|
52             5[56]
53             )|
54             77[1-57]
55             )\\d{4}
56             ',
57             'geographic' => '
58             (?:
59             2(?:
60             1[6-9]|
61             2[0-35-9]|
62             3[1-4]|
63             5[3-9]|
64             6\\d|
65             7[0-24-79]
66             )|
67             3(?:
68             2[25-9]|
69             3\\d
70             )|
71             4(?:
72             4[0-24]|
73             5[56]
74             )|
75             77[1-57]
76             )\\d{4}
77             ',
78             'mobile' => '
79             (?:
80             6\\d\\d|
81             70[0-35-7]
82             )\\d{4}
83             ',
84             'pager' => '',
85             'personal_number' => '',
86             'specialrate' => '(9008\\d{3})',
87             'toll_free' => '
88             (?:
89             289|
90             862
91             )\\d{4}
92             ',
93             'voip' => ''
94             };
95             my %areanames = ();
96             $areanames{en} = {"592329", "Willemstad\/Fort\ Wellington\/Ithaca",
97             "592266", "New\ Hope\/Friendship\/Grove\/Land\ of\ Canaan",
98             "592256", "Victoria\/Hope\ West",
99             "592333", "New\ Amsterdam",
100             "592322", "Kilcoy\/Hampshire\/Nigg",
101             "592777", "Mabaruma\/Port\ Kaituma",
102             "592772", "Lethem",
103             "592327", "Blairmont\/Cumberland",
104             "592218", "Georgetown\ \(S\/R\/Veldt\)",
105             "592219", "Georgetown\,Sophia",
106             "592225", "Georgetown",
107             "592217", "Mocha",
108             "592328", "Cottage\/Tempe\/Onverwagt\/Bath\/Waterloo",
109             "592258", "Planters\ Hall\/Mortice",
110             "592268", "Leonora",
111             "592335", "Crabwood\ Creek\/No\:\ 76\/Corentyne",
112             "592216", "Diamond\/Grove",
113             "592334", "New\ Amsterdam",
114             "592275", "Met\-en\-Meer\-Zorg",
115             "592274", "Vigilance",
116             "592262", "Parika",
117             "592442", "Christianburg\/Amelia\’s\ Ward",
118             "592231", "Georgetown",
119             "592455", "Bartica",
120             "592267", "Wales",
121             "592261", "Timehri\/Long\ Creek\/Soesdyke",
122             "592441", "Ituni",
123             "592260", "Tuschen\/Parika",
124             "592440", "Kwakwani",
125             "592232", "Novar\/Catherine\/Belladrum\/Bush\ Lot",
126             "592257", "Cane\ Grove\/Strangroen",
127             "592269", "Windsor\ Forest",
128             "592326", "Adelphi\/Fryish\/No\.\ 40",
129             "592223", "Georgetown",
130             "592259", "Clonbrook\/Unity",
131             "592325", "Mibikuri\/No\:\ 34\/Joppa\/Brighton",
132             "592775", "Matthews\ Ridge",
133             "592228", "Mahaica\/Belmont",
134             "592456", "Mahdia",
135             "592233", "Agricola\/Houston\/Eccles\/Nandy\ Park",
136             "592336", "Edinburg\/Port\ Mourant",
137             "592253", "La\ Grange\/Goed\ Fortuin",
138             "592276", "Anna\ Catherina\/\ Cornelia\ Ida\/Hague\/Fellowship",
139             "592229", "Enterprise\/Cove\ \&\ John",
140             "592220", "B\/V\ Central",
141             "592221", "Mahaicony",
142             "592227", "Georgetown",
143             "592222", "B\/V\ West",
144             "592332", "Sheet\ Anchor\/Susannah",
145             "592271", "Canal\ No\.\ 1\/Canal\ No\.\ 2",
146             "592337", "Whim\/Bloomfield\/Liverpool\/Rose\ Hall",
147             "592270", "Melanie\/Non\ Pariel\/Enmore",
148             "592272", "B\/V\ West",
149             "592331", "Adventure\/Joanna",
150             "592330", "Rosignol\/Shieldstown",
151             "592277", "Zeeburg\/Uitvlugt",
152             "592339", "No\:\ 52\/Skeldon",
153             "592279", "Good\ Hope\/Stanleytown",
154             "592773", "Aishalton",
155             "592226", "Georgetown",
156             "592338", "Benab\/No\.\ 65\ Village\/Massiah",
157             "592265", "Diamond",
158             "592264", "Vreed\-en\-Hoop",
159             "592444", "Linden\/Canvas\ City\/Wisroc",
160             "592255", "Paradise\/Golden\ Grove\/Haslington",
161             "592254", "New\ Road\/Best",
162             "592234", "B\/V\ Central",};
163              
164             sub new {
165 13     13 1 33 my $class = shift;
166 13         23 my $number = shift;
167 13         77 $number =~ s/(^\+592|\D)//g;
168 13         81 my $self = bless({ country_code => '592', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
169 13 100       67 return $self->is_valid() ? $self : undef;
170             }
171             1;