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   1097 use base qw(Number::Phone::StubCountry);
  2         7  
  2         228  
21              
22 2     2   18 use strict;
  2         5  
  2         46  
23 2     2   10 use warnings;
  2         4  
  2         51  
24 2     2   13 use utf8;
  2         5  
  2         12  
25             our $VERSION = 1.20230307181420;
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} = {"592232", "Novar\/Catherine\/Belladrum\/Bush\ Lot",
97             "592254", "New\ Road\/Best",
98             "592455", "Bartica",
99             "592331", "Adventure\/Joanna",
100             "592220", "B\/V\ Central",
101             "592226", "Georgetown",
102             "592333", "New\ Amsterdam",
103             "592270", "Melanie\/Non\ Pariel\/Enmore",
104             "592440", "Kwakwani",
105             "592261", "Timehri\/Long\ Creek\/Soesdyke",
106             "592276", "Anna\ Catherina\/\ Cornelia\ Ida\/Hague\/Fellowship",
107             "592328", "Cottage\/Tempe\/Onverwagt\/Bath\/Waterloo",
108             "592327", "Blairmont\/Cumberland",
109             "592322", "Kilcoy\/Hampshire\/Nigg",
110             "592336", "Edinburg\/Port\ Mourant",
111             "592219", "Georgetown\,Sophia",
112             "592221", "Mahaicony",
113             "592325", "Mibikuri\/No\:\ 34\/Joppa\/Brighton",
114             "592259", "Clonbrook\/Unity",
115             "592330", "Rosignol\/Shieldstown",
116             "592223", "Georgetown",
117             "592218", "Georgetown\ \(S\/R\/Veldt\)",
118             "592257", "Cane\ Grove\/Strangroen",
119             "592258", "Planters\ Hall\/Mortice",
120             "592217", "Mocha",
121             "592329", "Willemstad\/Fort\ Wellington\/Ithaca",
122             "592266", "New\ Hope\/Friendship\/Grove\/Land\ of\ Canaan",
123             "592255", "Paradise\/Golden\ Grove\/Haslington",
124             "592234", "B\/V\ Central",
125             "592441", "Ituni",
126             "592260", "Tuschen\/Parika",
127             "592773", "Aishalton",
128             "592271", "Canal\ No\.\ 1\/Canal\ No\.\ 2",
129             "592267", "Wales",
130             "592262", "Parika",
131             "592268", "Leonora",
132             "592233", "Agricola\/Houston\/Eccles\/Nandy\ Park",
133             "592339", "No\:\ 52\/Skeldon",
134             "592256", "Victoria\/Hope\ West",
135             "592265", "Diamond",
136             "592216", "Diamond\/Grove",
137             "592338", "Benab\/No\.\ 65\ Village\/Massiah",
138             "592337", "Whim\/Bloomfield\/Liverpool\/Rose\ Hall",
139             "592332", "Sheet\ Anchor\/Susannah",
140             "592274", "Vigilance",
141             "592326", "Adelphi\/Fryish\/No\.\ 40",
142             "592269", "Windsor\ Forest",
143             "592444", "Linden\/Canvas\ City\/Wisroc",
144             "592335", "Crabwood\ Creek\/No\:\ 76\/Corentyne",
145             "592231", "Georgetown",
146             "592272", "B\/V\ West",
147             "592277", "Zeeburg\/Uitvlugt",
148             "592442", "Christianburg\/Amelia\’s\ Ward",
149             "592275", "Met\-en\-Meer\-Zorg",
150             "592229", "Enterprise\/Cove\ \&\ John",
151             "592334", "New\ Amsterdam",
152             "592253", "La\ Grange\/Goed\ Fortuin",
153             "592775", "Matthews\ Ridge",
154             "592228", "Mahaica\/Belmont",
155             "592222", "B\/V\ West",
156             "592227", "Georgetown",
157             "592225", "Georgetown",
158             "592772", "Lethem",
159             "592777", "Mabaruma\/Port\ Kaituma",
160             "592264", "Vreed\-en\-Hoop",
161             "592279", "Good\ Hope\/Stanleytown",
162             "592456", "Mahdia",};
163              
164             sub new {
165 13     13 1 28 my $class = shift;
166 13         18 my $number = shift;
167 13         75 $number =~ s/(^\+592|\D)//g;
168 13         88 my $self = bless({ country_code => '592', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
169 13 100       57 return $self->is_valid() ? $self : undef;
170             }
171             1;