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