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