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