blib/lib/Number/Phone/StubCountry/HN.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 32 / 32 CC 2 SCAR 2.9
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/Number/Phone/StubCountry/HK.pm ↑ Summary blib/lib/Number/Phone/StubCountry/HT.pm »
1 # automatically generated file, don't edit
2  
3  
4  
5 # Copyright 2026 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::HN;
20 2 ▶use base qw(Number::Phone::StubCountry);
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 our $VERSION = 1.20260904101550;
26  
27 2 my $formatters = [
28 {
29 'format' => '$1-$2',
30 'leading_digits' => '[237-9]',
31 'pattern' => '(\\d{4})(\\d{4})'
32 },
33 {
34 'format' => '$1 $2 $3',
35 'intl_format' => 'NA',
36 'leading_digits' => '8',
37 'pattern' => '(\\d{3})(\\d{4})(\\d{4})'
38 }
39 ];
40  
41 2 my $validators = {
42 'fixed_line' => '
43 2(?:
44 2(?:
45 0[0-59]|
46 1[1-9]|
47 [23]\\d|
48 4[02-8]|
49 5[57]|
50 6[2458]|
51 7[0135689]|
52 8[01346-9]|
53 9[0-2]
54 )|
55 4(?:
56 0[578]|
57 2[3-59]|
58 3[13-9]|
59 4[0-68]|
60 5[1-3589]|
61 80
62 )|
63 5(?:
64 0[2357-9]|
65 1[1-6]|
66 4[03-58]|
67 5\\d|
68 6[014-69]|
69 7[04]|
70 80
71 )|
72 6(?:
73 [056]\\d|
74 17|
75 2[067]|
76 3[047]|
77 4[0-378]|
78 [78][0-8]|
79 9[01]
80 )|
81 7(?:
82 0[5-79]|
83 2[01]|
84 6[46-9]|
85 7[02-9]|
86 8[034]|
87 91
88 )|
89 8(?:
90 79|
91 8[0-357-9]|
92 9[1-57-9]
93 )
94 )\\d{4}
95 ',
96 'geographic' => '
97 2(?:
98 2(?:
99 0[0-59]|
100 1[1-9]|
101 [23]\\d|
102 4[02-8]|
103 5[57]|
104 6[2458]|
105 7[0135689]|
106 8[01346-9]|
107 9[0-2]
108 )|
109 4(?:
110 0[578]|
111 2[3-59]|
112 3[13-9]|
113 4[0-68]|
114 5[1-3589]|
115 80
116 )|
117 5(?:
118 0[2357-9]|
119 1[1-6]|
120 4[03-58]|
121 5\\d|
122 6[014-69]|
123 7[04]|
124 80
125 )|
126 6(?:
127 [056]\\d|
128 17|
129 2[067]|
130 3[047]|
131 4[0-378]|
132 [78][0-8]|
133 9[01]
134 )|
135 7(?:
136 0[5-79]|
137 2[01]|
138 6[46-9]|
139 7[02-9]|
140 8[034]|
141 91
142 )|
143 8(?:
144 79|
145 8[0-357-9]|
146 9[1-57-9]
147 )
148 )\\d{4}
149 ',
150 'mobile' => '[37-9]\\d{7}',
151 'pager' => '',
152 'personal_number' => '',
153 'specialrate' => '',
154 'toll_free' => '8002\\d{7}',
155 'voip' => ''
156 };
157 2 my %areanames = ();
158 2 $areanames{en} = {"5042222", "Principal",
159 "5042220", "Principal",
160 "5042203", "Polo\ Paz",
161 "5042234", "Toncontín",
162 "5042238", "Principal",
163 "5042257", "Prados\ Universitarios",
164 "5042678", "Potrerillos",
165 "5042674", "Sulaco\/Los\ Orcones",
166 "5042434", "Trujillo",
167 "5042764", "Amarat\/Marcala",
168 "5042881", "San\ Lorenzo",
169 "5042768", "Sabana\ Grande",
170 "5042438", "Bonito\ Oriental",
171 "5042769", "Guaimaca",
172 "5042200", "Polo\ Paz",
173 "5042202", "Tegucigalpa",
174 "5042223", "Polo\ Paz",
175 "5042647", "Progreso",
176 "5042283", "Francisco\ Morazan",
177 "5042423", "La\ Ceiba",
178 "5042239", "Miraflores",
179 "5042545", "San\ Pedro\ Sula\,\ Cortés",
180 "5042221", "Almendros",
181 "5042502", "Cortes",
182 "5042445", "Coxin\ Hole\,\ Roatán",
183 "5042245", "La\ Vega\,\ Tegucigalpa",
184 "5042882", "Choluteca",
185 "5042880", "Choluteca",
186 "5042281", "Francisco\ Morazan",
187 "5042503", "Cortes",
188 "5042201", "Polo\ Paz",
189 "5042557", "San\ Pedro\ Sula\,\ Cortés",
190 "5042655", "Lepaera\/Corquín",
191 "5042897", "San\ Fco\.\ De\ Becerra",
192 "5042775", "Talanga",
193 "5042570", "Cortes",
194 "5042226", "Loarque",
195 "5042883", "Danli",
196 "5042236", "Almendros",
197 "5042255", "El\ Hato",
198 "5042574", "Búfalo",
199 "5042455", "French\ Harbour",
200 "5042889", "Campamento",
201 "5042766", "Valle\ De\ Ángeles",
202 "5042436", "La\ Masica",
203 "5042888", "S\.\ Marcos\/Proy\.\ Ala",
204 "5042431", "San\ Francisco\,\ Atlántida",
205 "5042215", "Francisco\ Morazan",
206 "5042671", "Yoro",
207 "5042231", "Miraflores",
208 "5042433", "Arenal",
209 "5042229", "El\ Ocotal",
210 "5042673", "Potrerillos",
211 "5042515", "Cortes",
212 "5042429", "San\ Alejo\/Mesapa",
213 "5042233", "Toncontín",
214 "5042204", "Francisco\ Morazan",
215 "5042565", "Chamelecón",
216 "5042672", "Cofradía",
217 "5042670", "Villa\ Nueva",
218 "504270", "Olancho",
219 "5042555", "Rivera\ Hernandez\,\ San\ Pedro\ Sula",
220 "5042424", "Sabá",
221 "5042209", "Res\.\ Centro\ América\,\ Tegucigalpa",
222 "5042657", "El\ Naranjo\ Sta\ Bárbara",
223 "5042230", "Kennedy\,\ Tegucigalpa",
224 "5042232", "Miraflores",
225 "504261", "Choloma\,\ Cortés",
226 "5042895", "Nacaome\/Amapala",
227 "5042224", "Cerro\ Grande",
228 "5042777", "Proyecto\ Ala",
229 "5042228", "Kennedy\,\ Tegucigalpa",
230 "5042887", "Proyecto\ Ala",
231 "5042216", "Rdsi\ Tegucigalpa\ \(Pri3\)",
232 "5042451", "Sonaguera",
233 "5042893", "El\ Paraíso",
234 "504258", "San\ Pedro\ Sula\,\ Cortés",
235 "5042544", "Rdsi\ San\ Pedro\ Sula",
236 "5042548", "San\ Pedro\ Sula\,\ Cortés",
237 "5042553", "San\ Pedro\ Sula\,\ Cortés",
238 "5042512", "San\ Pedro\ Sula\,\ Cortés",
239 "5042235", "Miraflores",
240 "5042291", "Toncontin",
241 "504287", "Choluteca",
242 "5042892", "Yuscarán",
243 "5042675", "Villa\ Nueva",
244 "5042513", "Cortes",
245 "5042211", "El\ Picacho",
246 "5042641", "C\.\ Comunitarios",
247 "5042552", "San\ Pedro\ Sula\,\ Cortés",
248 "5042550", "San\ Pedro\ Sula\,\ Cortés",
249 "5042435", "Oakridge",
250 "5042556", "La\ Puerta",
251 "5042452", "Coyoles\ Central",
252 "5042566", "Jardines\ Del\ Valle",
253 "5042774", "La\ Paz",
254 "5042784", "La\ Libertad",
255 "5042643", "Santa\ Bárbara",
256 "5042778", "Centros\ Comunitarios",
257 "5042227", "Res\.\ Centro\ América\,\ Tegucigalpa",
258 "5042658", "Macueliso\ Omoa\/Trascerros",
259 "5042511", "Cortes",
260 "5042654", "Santa\ Cruz",
261 "5042213", "Telef\.\ Inalámbrica\ Tegucig\.",
262 "5042637", "Santa\ Barbra",
263 "5042779", "Santa\ Lucía",
264 "5042407", "Roatán\,\ Bay\ Islands",
265 "5042516", "San\ Pedro\ Sula\,\ Cortés",
266 "5042659", "El\ Mochito\/Quimistán",
267 "5042448", "Tela",
268 "5042290", "Toncontin",
269 "5042444", "Tocoa\,\ Colón",
270 "5042891", "S\.\ Franc\.\ De\ La\ Paz",
271 "5042453", "Guanaja",
272 "5042551", "Monte\ Prieto",
273 "5042248", "Tegucigalpa",
274 "504248", "Atlantida",
275 "5042244", "Tegucigalpa",
276 "5042212", "Rdsi\ Tegucigalpa\ \(Pri3\)",
277 "5042640", "C\.\ Comunitarios",
278 "5042642", "C\.\ Comunitarios",
279 "5042885", "Juticalpa",
280 "5042242", "Francisco\ Morazan",
281 "5042240", "Kennedy\,\ Tegucigalpa",
282 "5042459", "Atlantida",
283 "5042783", "La\ Esperanza",
284 "5042773", "Siguatepeque",
285 "5042648", "Progreso\/Santa\ Cruz",
286 "5042214", "Francisco\ Morazan",
287 "5042653", "Nueva\ Ocotepeque",
288 "5042218", "Francisco\ Morazan",
289 "504268", "La\ Lima",
290 "5042690", "El\ Negrito",
291 "5042440", "La\ Ceiba",
292 "5042442", "La\ Ceiba",
293 "5042505", "Cortes",
294 "5042237", "Principal",
295 "5042652", "Agua\ Caliente",
296 "5042650", "San\ Manuel\/Rio\ Lindo",
297 "5042268", "Tegucigalpa",
298 "5042770", "Comayagua",
299 "5042772", "Comayagua",
300 "5042780", "Choluteca",
301 "5042443", "La\ Ceiba",
302 "5042458", "Atlantida",
303 "5042720", "Comayagua\/Choluteca\/El\ Paraíso\/Valle\/La\ Paz\/Olancho\/Intibucá\/",
304 "5042219", "Francisco\ Morazan",
305 "5042767", "Ojojona",
306 "5042564", "San\ Pedro\ Sula\,\ Cortés",
307 "5042543", "Inalámbrica\ Sps",
308 "5042558", "San\ Pedro\ Sula\,\ Cortés",
309 "5042554", "Monte\ Prieto",
310 "5042425", "Utila\,\ Bay\ Islands",
311 "5042898", "Domsat",
312 "5042894", "Amatillo\/Goascorán",
313 "5042225", "La\ Granja",
314 "5042656", "Gracias\/S\.R\.Copán",
315 "5042691", "Morazán",
316 "5042776", "Zamorano",
317 "5042899", "Catacamas",
318 "5042405", "Atlantida",
319 "5042446", "Olanchito",
320 "5042540", "San\ Pedro\ Sula\,\ Cortés",
321 "5042514", "San\ Pedro\ Sula\,\ Cortés",
322 "5042651", "Cucuyagua\/Copán",
323 "5042721", "Comayagua\/Francisco\ Morazán",
324 "5042569", "Cortes",
325 "5042246", "La\ Vega\,\ Tegucigalpa",
326 "5042559", "Col\.\ Satélite",};
327 2 my $timezones = {
328 '' => [
329 'America/Tegucigalpa'
330 ]
331 };
332  
333 10 ▶ sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
334 10 my $class = shift;
335 10 my $number = shift;
336 10 $number =~ s/(^\+504|\D)//g;
337 10 my $self = bless({ country_code => '504', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
338 10 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 9 1 10
339 }
340 2 1;
« blib/lib/Number/Phone/StubCountry/HK.pm ↑ Summary blib/lib/Number/Phone/StubCountry/HT.pm »