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
|
|
1509
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
296
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
51
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
65
|
|
24
|
2
|
|
|
2
|
|
17
|
use utf8; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
17
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174403; |
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} = {"5042291", "Toncontin", |
155
|
|
|
|
|
|
|
"5042233", "Toncontín", |
156
|
|
|
|
|
|
|
"5042443", "La\ Ceiba", |
157
|
|
|
|
|
|
|
"5042455", "French\ Harbour", |
158
|
|
|
|
|
|
|
"5042880", "Choluteca", |
159
|
|
|
|
|
|
|
"5042650", "San\ Manuel\/Rio\ Lindo", |
160
|
|
|
|
|
|
|
"5042505", "Cortes", |
161
|
|
|
|
|
|
|
"5042675", "Villa\ Nueva", |
162
|
|
|
|
|
|
|
"5042515", "Cortes", |
163
|
|
|
|
|
|
|
"5042540", "San\ Pedro\ Sula\,\ Cortés", |
164
|
|
|
|
|
|
|
"5042281", "Francisco\ Morazan", |
165
|
|
|
|
|
|
|
"5042438", "Bonito\ Oriental", |
166
|
|
|
|
|
|
|
"504268", "La\ Lima", |
167
|
|
|
|
|
|
|
"5042516", "San\ Pedro\ Sula\,\ Cortés", |
168
|
|
|
|
|
|
|
"5042774", "La\ Paz", |
169
|
|
|
|
|
|
|
"5042435", "Oakridge", |
170
|
|
|
|
|
|
|
"5042442", "La\ Ceiba", |
171
|
|
|
|
|
|
|
"5042641", "C\.\ Comunitarios", |
172
|
|
|
|
|
|
|
"5042566", "Jardines\ Del\ Valle", |
173
|
|
|
|
|
|
|
"5042232", "Miraflores", |
174
|
|
|
|
|
|
|
"5042245", "La\ Vega\,\ Tegucigalpa", |
175
|
|
|
|
|
|
|
"5042200", "Polo\ Paz", |
176
|
|
|
|
|
|
|
"5042220", "Principal", |
177
|
|
|
|
|
|
|
"5042551", "Monte\ Prieto", |
178
|
|
|
|
|
|
|
"5042678", "Potrerillos", |
179
|
|
|
|
|
|
|
"5042784", "La\ Libertad", |
180
|
|
|
|
|
|
|
"5042436", "La\ Masica", |
181
|
|
|
|
|
|
|
"5042458", "Atlantida", |
182
|
|
|
|
|
|
|
"5042239", "Miraflores", |
183
|
|
|
|
|
|
|
"5042246", "La\ Vega\,\ Tegucigalpa", |
184
|
|
|
|
|
|
|
"5042565", "Chamelecón", |
185
|
|
|
|
|
|
|
"5042424", "Sabá", |
186
|
|
|
|
|
|
|
"5042554", "Monte\ Prieto", |
187
|
|
|
|
|
|
|
"5042670", "Villa\ Nueva", |
188
|
|
|
|
|
|
|
"5042423", "La\ Ceiba", |
189
|
|
|
|
|
|
|
"5042553", "San\ Pedro\ Sula\,\ Cortés", |
190
|
|
|
|
|
|
|
"5042897", "San\ Fco\.\ De\ Becerra", |
191
|
|
|
|
|
|
|
"5042545", "San\ Pedro\ Sula\,\ Cortés", |
192
|
|
|
|
|
|
|
"5042885", "Juticalpa", |
193
|
|
|
|
|
|
|
"5042655", "Lepaera\/Corquín", |
194
|
|
|
|
|
|
|
"5042643", "Santa\ Bárbara", |
195
|
|
|
|
|
|
|
"5042690", "El\ Negrito", |
196
|
|
|
|
|
|
|
"5042783", "La\ Esperanza", |
197
|
|
|
|
|
|
|
"504287", "Choluteca", |
198
|
|
|
|
|
|
|
"5042656", "Gracias\/S\.R\.Copán", |
199
|
|
|
|
|
|
|
"5042768", "Sabana\ Grande", |
200
|
|
|
|
|
|
|
"5042218", "Francisco\ Morazan", |
201
|
|
|
|
|
|
|
"5042895", "Nacaome\/Amapala", |
202
|
|
|
|
|
|
|
"5042773", "Siguatepeque", |
203
|
|
|
|
|
|
|
"5042887", "Proyecto\ Ala", |
204
|
|
|
|
|
|
|
"5042657", "El\ Naranjo\ Sta\ Bárbara", |
205
|
|
|
|
|
|
|
"5042228", "Kennedy\,\ Tegucigalpa", |
206
|
|
|
|
|
|
|
"504270", "Olancho", |
207
|
|
|
|
|
|
|
"5042225", "La\ Granja", |
208
|
|
|
|
|
|
|
"5042898", "Domsat", |
209
|
|
|
|
|
|
|
"5042240", "Kennedy\,\ Tegucigalpa", |
210
|
|
|
|
|
|
|
"5042215", "Francisco\ Morazan", |
211
|
|
|
|
|
|
|
"5042779", "Santa\ Lucía", |
212
|
|
|
|
|
|
|
"5042642", "C\.\ Comunitarios", |
213
|
|
|
|
|
|
|
"5042231", "Miraflores", |
214
|
|
|
|
|
|
|
"5042552", "San\ Pedro\ Sula\,\ Cortés", |
215
|
|
|
|
|
|
|
"5042767", "Ojojona", |
216
|
|
|
|
|
|
|
"5042637", "Santa\ Barbra", |
217
|
|
|
|
|
|
|
"5042226", "Loarque", |
218
|
|
|
|
|
|
|
"5042574", "Búfalo", |
219
|
|
|
|
|
|
|
"5042444", "Tocoa\,\ Colón", |
220
|
|
|
|
|
|
|
"5042216", "Rdsi\ Tegucigalpa\ \(Pri3\)", |
221
|
|
|
|
|
|
|
"5042772", "Comayagua", |
222
|
|
|
|
|
|
|
"5042283", "Francisco\ Morazan", |
223
|
|
|
|
|
|
|
"5042766", "Valle\ De\ Ángeles", |
224
|
|
|
|
|
|
|
"5042658", "Macueliso\ Omoa\/Trascerros", |
225
|
|
|
|
|
|
|
"5042227", "Res\.\ Centro\ América\,\ Tegucigalpa", |
226
|
|
|
|
|
|
|
"5042888", "S\.\ Marcos\/Proy\.\ Ala", |
227
|
|
|
|
|
|
|
"5042234", "Toncontín", |
228
|
|
|
|
|
|
|
"5042559", "Col\.\ Satélite", |
229
|
|
|
|
|
|
|
"5042429", "San\ Alejo\/Mesapa", |
230
|
|
|
|
|
|
|
"5042780", "Choluteca", |
231
|
|
|
|
|
|
|
"5042569", "Cortes", |
232
|
|
|
|
|
|
|
"5042242", "Francisco\ Morazan", |
233
|
|
|
|
|
|
|
"5042235", "Miraflores", |
234
|
|
|
|
|
|
|
"504261", "Choloma\,\ Cortés", |
235
|
|
|
|
|
|
|
"5042201", "Polo\ Paz", |
236
|
|
|
|
|
|
|
"5042445", "Coxin\ Hole\,\ Roatán", |
237
|
|
|
|
|
|
|
"5042453", "Guanaja", |
238
|
|
|
|
|
|
|
"5042640", "C\.\ Comunitarios", |
239
|
|
|
|
|
|
|
"5042211", "El\ Picacho", |
240
|
|
|
|
|
|
|
"5042503", "Cortes", |
241
|
|
|
|
|
|
|
"5042673", "Potrerillos", |
242
|
|
|
|
|
|
|
"5042221", "Almendros", |
243
|
|
|
|
|
|
|
"5042550", "San\ Pedro\ Sula\,\ Cortés", |
244
|
|
|
|
|
|
|
"5042513", "Cortes", |
245
|
|
|
|
|
|
|
"5042770", "Comayagua", |
246
|
|
|
|
|
|
|
"5042236", "Almendros", |
247
|
|
|
|
|
|
|
"5042764", "Amarat\/Marcala", |
248
|
|
|
|
|
|
|
"5042214", "Francisco\ Morazan", |
249
|
|
|
|
|
|
|
"5042446", "Olanchito", |
250
|
|
|
|
|
|
|
"5042204", "Francisco\ Morazan", |
251
|
|
|
|
|
|
|
"5042224", "Cerro\ Grande", |
252
|
|
|
|
|
|
|
"5042237", "Principal", |
253
|
|
|
|
|
|
|
"5042512", "San\ Pedro\ Sula\,\ Cortés", |
254
|
|
|
|
|
|
|
"5042672", "Cofradía", |
255
|
|
|
|
|
|
|
"5042502", "Cortes", |
256
|
|
|
|
|
|
|
"5042894", "Amatillo\/Goascorán", |
257
|
|
|
|
|
|
|
"5042290", "Toncontin", |
258
|
|
|
|
|
|
|
"5042433", "Arenal", |
259
|
|
|
|
|
|
|
"5042452", "Coyoles\ Central", |
260
|
|
|
|
|
|
|
"5042255", "El\ Hato", |
261
|
|
|
|
|
|
|
"5042881", "San\ Lorenzo", |
262
|
|
|
|
|
|
|
"5042651", "Cucuyagua\/Copán", |
263
|
|
|
|
|
|
|
"5042257", "Prados\ Universitarios", |
264
|
|
|
|
|
|
|
"5042448", "Tela", |
265
|
|
|
|
|
|
|
"5042459", "Atlantida", |
266
|
|
|
|
|
|
|
"5042891", "S\.\ Franc\.\ De\ La\ Paz", |
267
|
|
|
|
|
|
|
"5042238", "Principal", |
268
|
|
|
|
|
|
|
"5042654", "Santa\ Cruz", |
269
|
|
|
|
|
|
|
"5042544", "Rdsi\ San\ Pedro\ Sula", |
270
|
|
|
|
|
|
|
"5042425", "Utila\,\ Bay\ Islands", |
271
|
|
|
|
|
|
|
"5042777", "Proyecto\ Ala", |
272
|
|
|
|
|
|
|
"5042543", "Inalámbrica\ Sps", |
273
|
|
|
|
|
|
|
"5042555", "Rivera\ Hernandez\,\ San\ Pedro\ Sula", |
274
|
|
|
|
|
|
|
"5042570", "Cortes", |
275
|
|
|
|
|
|
|
"5042440", "La\ Ceiba", |
276
|
|
|
|
|
|
|
"5042653", "Nueva\ Ocotepeque", |
277
|
|
|
|
|
|
|
"5042564", "San\ Pedro\ Sula\,\ Cortés", |
278
|
|
|
|
|
|
|
"5042883", "Danli", |
279
|
|
|
|
|
|
|
"5042405", "Atlantida", |
280
|
|
|
|
|
|
|
"5042431", "San\ Francisco\,\ Atlántida", |
281
|
|
|
|
|
|
|
"5042202", "Tegucigalpa", |
282
|
|
|
|
|
|
|
"5042776", "Zamorano", |
283
|
|
|
|
|
|
|
"5042230", "Kennedy\,\ Tegucigalpa", |
284
|
|
|
|
|
|
|
"5042212", "Rdsi\ Tegucigalpa\ \(Pri3\)", |
285
|
|
|
|
|
|
|
"5042222", "Principal", |
286
|
|
|
|
|
|
|
"5042556", "La\ Puerta", |
287
|
|
|
|
|
|
|
"5042769", "Guaimaca", |
288
|
|
|
|
|
|
|
"5042244", "Tegucigalpa", |
289
|
|
|
|
|
|
|
"5042775", "Talanga", |
290
|
|
|
|
|
|
|
"5042893", "El\ Paraíso", |
291
|
|
|
|
|
|
|
"5042209", "Res\.\ Centro\ América\,\ Tegucigalpa", |
292
|
|
|
|
|
|
|
"5042557", "San\ Pedro\ Sula\,\ Cortés", |
293
|
|
|
|
|
|
|
"5042434", "Trujillo", |
294
|
|
|
|
|
|
|
"5042219", "Francisco\ Morazan", |
295
|
|
|
|
|
|
|
"5042647", "Progreso", |
296
|
|
|
|
|
|
|
"5042407", "Roatán\,\ Bay\ Islands", |
297
|
|
|
|
|
|
|
"5042229", "El\ Ocotal", |
298
|
|
|
|
|
|
|
"5042511", "Cortes", |
299
|
|
|
|
|
|
|
"5042223", "Polo\ Paz", |
300
|
|
|
|
|
|
|
"5042671", "Yoro", |
301
|
|
|
|
|
|
|
"5042213", "Telef\.\ Inalámbrica\ Tegucig\.", |
302
|
|
|
|
|
|
|
"5042778", "Centros\ Comunitarios", |
303
|
|
|
|
|
|
|
"5042203", "Polo\ Paz", |
304
|
|
|
|
|
|
|
"5042899", "Catacamas", |
305
|
|
|
|
|
|
|
"5042451", "Sonaguera", |
306
|
|
|
|
|
|
|
"5042882", "Choluteca", |
307
|
|
|
|
|
|
|
"5042691", "Morazán", |
308
|
|
|
|
|
|
|
"5042652", "Agua\ Caliente", |
309
|
|
|
|
|
|
|
"5042674", "Sulaco\/Los\ Orcones", |
310
|
|
|
|
|
|
|
"5042892", "Yuscarán", |
311
|
|
|
|
|
|
|
"5042889", "Campamento", |
312
|
|
|
|
|
|
|
"5042659", "El\ Mochito\/Quimistán", |
313
|
|
|
|
|
|
|
"5042648", "Progreso\/Santa\ Cruz", |
314
|
|
|
|
|
|
|
"5042558", "San\ Pedro\ Sula\,\ Cortés",}; |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
sub new { |
317
|
10
|
|
|
10
|
1
|
19
|
my $class = shift; |
318
|
10
|
|
|
|
|
26
|
my $number = shift; |
319
|
10
|
|
|
|
|
72
|
$number =~ s/(^\+504|\D)//g; |
320
|
10
|
|
|
|
|
76
|
my $self = bless({ country_code => '504', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
321
|
10
|
100
|
|
|
|
53
|
return $self->is_valid() ? $self : undef; |
322
|
|
|
|
|
|
|
} |
323
|
|
|
|
|
|
|
1; |