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::PY; |
20
|
2
|
|
|
2
|
|
1206
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
212
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
50
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
64
|
|
24
|
2
|
|
|
2
|
|
15
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
14
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => '[2-9]0', |
31
|
|
|
|
|
|
|
'national_rule' => '0$1', |
32
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3,6})' |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
'format' => '$1 $2', |
36
|
|
|
|
|
|
|
'leading_digits' => ' |
37
|
|
|
|
|
|
|
[26]1| |
38
|
|
|
|
|
|
|
3[289]| |
39
|
|
|
|
|
|
|
4[1246-8]| |
40
|
|
|
|
|
|
|
7[1-3]| |
41
|
|
|
|
|
|
|
8[1-36] |
42
|
|
|
|
|
|
|
', |
43
|
|
|
|
|
|
|
'national_rule' => '(0$1)', |
44
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{5})' |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
{ |
47
|
|
|
|
|
|
|
'format' => '$1 $2', |
48
|
|
|
|
|
|
|
'leading_digits' => ' |
49
|
|
|
|
|
|
|
2[279]| |
50
|
|
|
|
|
|
|
3[13-5]| |
51
|
|
|
|
|
|
|
4[359]| |
52
|
|
|
|
|
|
|
5| |
53
|
|
|
|
|
|
|
6(?: |
54
|
|
|
|
|
|
|
[34]| |
55
|
|
|
|
|
|
|
7[1-46-8] |
56
|
|
|
|
|
|
|
)| |
57
|
|
|
|
|
|
|
7[46-8]| |
58
|
|
|
|
|
|
|
85 |
59
|
|
|
|
|
|
|
', |
60
|
|
|
|
|
|
|
'national_rule' => '(0$1)', |
61
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4,5})' |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
{ |
64
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
65
|
|
|
|
|
|
|
'leading_digits' => ' |
66
|
|
|
|
|
|
|
2[14-68]| |
67
|
|
|
|
|
|
|
3[26-9]| |
68
|
|
|
|
|
|
|
4[1246-8]| |
69
|
|
|
|
|
|
|
6(?: |
70
|
|
|
|
|
|
|
1| |
71
|
|
|
|
|
|
|
75 |
72
|
|
|
|
|
|
|
)| |
73
|
|
|
|
|
|
|
7[1-35]| |
74
|
|
|
|
|
|
|
8[1-36] |
75
|
|
|
|
|
|
|
', |
76
|
|
|
|
|
|
|
'national_rule' => '(0$1)', |
77
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3})(\\d{3,4})' |
78
|
|
|
|
|
|
|
}, |
79
|
|
|
|
|
|
|
{ |
80
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
81
|
|
|
|
|
|
|
'leading_digits' => '87', |
82
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3})(\\d{4})' |
83
|
|
|
|
|
|
|
}, |
84
|
|
|
|
|
|
|
{ |
85
|
|
|
|
|
|
|
'format' => '$1 $2', |
86
|
|
|
|
|
|
|
'leading_digits' => ' |
87
|
|
|
|
|
|
|
9(?: |
88
|
|
|
|
|
|
|
[5-79]| |
89
|
|
|
|
|
|
|
8[1-6] |
90
|
|
|
|
|
|
|
) |
91
|
|
|
|
|
|
|
', |
92
|
|
|
|
|
|
|
'national_rule' => '0$1', |
93
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{6})' |
94
|
|
|
|
|
|
|
}, |
95
|
|
|
|
|
|
|
{ |
96
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
97
|
|
|
|
|
|
|
'leading_digits' => '[2-8]', |
98
|
|
|
|
|
|
|
'national_rule' => '0$1', |
99
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{3})' |
100
|
|
|
|
|
|
|
}, |
101
|
|
|
|
|
|
|
{ |
102
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
103
|
|
|
|
|
|
|
'leading_digits' => '9', |
104
|
|
|
|
|
|
|
'pattern' => '(\\d{4})(\\d{3})(\\d{4})' |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
]; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
my $validators = { |
109
|
|
|
|
|
|
|
'fixed_line' => ' |
110
|
|
|
|
|
|
|
(?: |
111
|
|
|
|
|
|
|
[26]1| |
112
|
|
|
|
|
|
|
3[289]| |
113
|
|
|
|
|
|
|
4[1246-8]| |
114
|
|
|
|
|
|
|
7[1-3]| |
115
|
|
|
|
|
|
|
8[1-36] |
116
|
|
|
|
|
|
|
)\\d{5,7}| |
117
|
|
|
|
|
|
|
(?: |
118
|
|
|
|
|
|
|
2(?: |
119
|
|
|
|
|
|
|
2[4-68]| |
120
|
|
|
|
|
|
|
[4-68]\\d| |
121
|
|
|
|
|
|
|
7[15]| |
122
|
|
|
|
|
|
|
9[1-5] |
123
|
|
|
|
|
|
|
)| |
124
|
|
|
|
|
|
|
3(?: |
125
|
|
|
|
|
|
|
18| |
126
|
|
|
|
|
|
|
3[167]| |
127
|
|
|
|
|
|
|
4[2357]| |
128
|
|
|
|
|
|
|
51| |
129
|
|
|
|
|
|
|
[67]\\d |
130
|
|
|
|
|
|
|
)| |
131
|
|
|
|
|
|
|
4(?: |
132
|
|
|
|
|
|
|
3[12]| |
133
|
|
|
|
|
|
|
5[13]| |
134
|
|
|
|
|
|
|
9[1-47] |
135
|
|
|
|
|
|
|
)| |
136
|
|
|
|
|
|
|
5(?: |
137
|
|
|
|
|
|
|
[1-4]\\d| |
138
|
|
|
|
|
|
|
5[02-4] |
139
|
|
|
|
|
|
|
)| |
140
|
|
|
|
|
|
|
6(?: |
141
|
|
|
|
|
|
|
3[1-3]| |
142
|
|
|
|
|
|
|
44| |
143
|
|
|
|
|
|
|
7[1-8] |
144
|
|
|
|
|
|
|
)| |
145
|
|
|
|
|
|
|
7(?: |
146
|
|
|
|
|
|
|
4[0-4]| |
147
|
|
|
|
|
|
|
5\\d| |
148
|
|
|
|
|
|
|
6[1-578]| |
149
|
|
|
|
|
|
|
75| |
150
|
|
|
|
|
|
|
8[0-8] |
151
|
|
|
|
|
|
|
)| |
152
|
|
|
|
|
|
|
858 |
153
|
|
|
|
|
|
|
)\\d{5,6} |
154
|
|
|
|
|
|
|
', |
155
|
|
|
|
|
|
|
'geographic' => ' |
156
|
|
|
|
|
|
|
(?: |
157
|
|
|
|
|
|
|
[26]1| |
158
|
|
|
|
|
|
|
3[289]| |
159
|
|
|
|
|
|
|
4[1246-8]| |
160
|
|
|
|
|
|
|
7[1-3]| |
161
|
|
|
|
|
|
|
8[1-36] |
162
|
|
|
|
|
|
|
)\\d{5,7}| |
163
|
|
|
|
|
|
|
(?: |
164
|
|
|
|
|
|
|
2(?: |
165
|
|
|
|
|
|
|
2[4-68]| |
166
|
|
|
|
|
|
|
[4-68]\\d| |
167
|
|
|
|
|
|
|
7[15]| |
168
|
|
|
|
|
|
|
9[1-5] |
169
|
|
|
|
|
|
|
)| |
170
|
|
|
|
|
|
|
3(?: |
171
|
|
|
|
|
|
|
18| |
172
|
|
|
|
|
|
|
3[167]| |
173
|
|
|
|
|
|
|
4[2357]| |
174
|
|
|
|
|
|
|
51| |
175
|
|
|
|
|
|
|
[67]\\d |
176
|
|
|
|
|
|
|
)| |
177
|
|
|
|
|
|
|
4(?: |
178
|
|
|
|
|
|
|
3[12]| |
179
|
|
|
|
|
|
|
5[13]| |
180
|
|
|
|
|
|
|
9[1-47] |
181
|
|
|
|
|
|
|
)| |
182
|
|
|
|
|
|
|
5(?: |
183
|
|
|
|
|
|
|
[1-4]\\d| |
184
|
|
|
|
|
|
|
5[02-4] |
185
|
|
|
|
|
|
|
)| |
186
|
|
|
|
|
|
|
6(?: |
187
|
|
|
|
|
|
|
3[1-3]| |
188
|
|
|
|
|
|
|
44| |
189
|
|
|
|
|
|
|
7[1-8] |
190
|
|
|
|
|
|
|
)| |
191
|
|
|
|
|
|
|
7(?: |
192
|
|
|
|
|
|
|
4[0-4]| |
193
|
|
|
|
|
|
|
5\\d| |
194
|
|
|
|
|
|
|
6[1-578]| |
195
|
|
|
|
|
|
|
75| |
196
|
|
|
|
|
|
|
8[0-8] |
197
|
|
|
|
|
|
|
)| |
198
|
|
|
|
|
|
|
858 |
199
|
|
|
|
|
|
|
)\\d{5,6} |
200
|
|
|
|
|
|
|
', |
201
|
|
|
|
|
|
|
'mobile' => ' |
202
|
|
|
|
|
|
|
9(?: |
203
|
|
|
|
|
|
|
51| |
204
|
|
|
|
|
|
|
6[129]| |
205
|
|
|
|
|
|
|
[78][1-6]| |
206
|
|
|
|
|
|
|
9[1-5] |
207
|
|
|
|
|
|
|
)\\d{6} |
208
|
|
|
|
|
|
|
', |
209
|
|
|
|
|
|
|
'pager' => '', |
210
|
|
|
|
|
|
|
'personal_number' => '', |
211
|
|
|
|
|
|
|
'specialrate' => '([2-9]0\\d{4,7})', |
212
|
|
|
|
|
|
|
'toll_free' => '9800\\d{5,7}', |
213
|
|
|
|
|
|
|
'voip' => '8700[0-4]\\d{4}' |
214
|
|
|
|
|
|
|
}; |
215
|
|
|
|
|
|
|
my %areanames = (); |
216
|
|
|
|
|
|
|
$areanames{en} = {"59538", "Bella\ Vista\ Norte", |
217
|
|
|
|
|
|
|
"595767", "Bella\ Vista\ Sur", |
218
|
|
|
|
|
|
|
"595673", "Santa\ Rita", |
219
|
|
|
|
|
|
|
"595676", "Naranjal", |
220
|
|
|
|
|
|
|
"595678", "Santa\ Rosa\ Del\ Monday", |
221
|
|
|
|
|
|
|
"59533", "Loreto", |
222
|
|
|
|
|
|
|
"595293", "Guarambare", |
223
|
|
|
|
|
|
|
"595554", "Itape", |
224
|
|
|
|
|
|
|
"59564", "Cargil", |
225
|
|
|
|
|
|
|
"59525", "Villeta", |
226
|
|
|
|
|
|
|
"595671", "Mayor\ Otano", |
227
|
|
|
|
|
|
|
"595550", "Mauricio\ Jose\ Troche", |
228
|
|
|
|
|
|
|
"595295", "Jose\ Augusto\ Saldivar", |
229
|
|
|
|
|
|
|
"595674", "Juan\ E\.\ O\ Leary", |
230
|
|
|
|
|
|
|
"595762", "Carmen\ Del\ Parana", |
231
|
|
|
|
|
|
|
"595294", "Itaugua", |
232
|
|
|
|
|
|
|
"595675", "Juan\ Leon\ Mallorquin", |
233
|
|
|
|
|
|
|
"595553", "Tebicuary", |
234
|
|
|
|
|
|
|
"595291", "Aregua", |
235
|
|
|
|
|
|
|
"59526", "Villa\ Hayes", |
236
|
|
|
|
|
|
|
"59546", "Salto\ Del\ Guaira", |
237
|
|
|
|
|
|
|
"595763", "La\ Paz", |
238
|
|
|
|
|
|
|
"595677", "San\ Alberto", |
239
|
|
|
|
|
|
|
"595768", "Pirapo", |
240
|
|
|
|
|
|
|
"595552", "Paso\ Yobay", |
241
|
|
|
|
|
|
|
"59573", "San\ Cosme", |
242
|
|
|
|
|
|
|
"59542", "San\ Pedro\ Del\ Ycua\ Mandyju", |
243
|
|
|
|
|
|
|
"59521", "Fernando\ De\ La\ Mora\,\ Lambare\,\ Limpio\,\ Luque\,\ Mariano\ Roque\ Alonso\,\ San\ Antonio\,\ Valle\ Pucu\ and\ Villa\ Elisa", |
244
|
|
|
|
|
|
|
"59539", "Yby\ Ja\'U", |
245
|
|
|
|
|
|
|
"59541", "Itacurubi\ Del\ Rosario", |
246
|
|
|
|
|
|
|
"595761", "Colonia\ Fram", |
247
|
|
|
|
|
|
|
"59547", "Puente\ Kyha", |
248
|
|
|
|
|
|
|
"595672", "Kressburgo", |
249
|
|
|
|
|
|
|
"595764", "Maria\ Auxiliadora", |
250
|
|
|
|
|
|
|
"595292", "Nueva\ Italia", |
251
|
|
|
|
|
|
|
"59583", "Villa\ Florida", |
252
|
|
|
|
|
|
|
"59536", "Pedro\ Juan\ Caballero", |
253
|
|
|
|
|
|
|
"595451", "Colonia\ Volendam", |
254
|
|
|
|
|
|
|
"59585", "Santa\ Rosa\ \/\ Misiones", |
255
|
|
|
|
|
|
|
"595345", "Corpus\ Christi", |
256
|
|
|
|
|
|
|
"595787", "General\ \ Diaz", |
257
|
|
|
|
|
|
|
"59532", "Horqueta", |
258
|
|
|
|
|
|
|
"59531", "Concepcion", |
259
|
|
|
|
|
|
|
"595631", "Hernandarias", |
260
|
|
|
|
|
|
|
"595742", "San\ Pedro\ Del\ Parana", |
261
|
|
|
|
|
|
|
"59575", "Hoenau", |
262
|
|
|
|
|
|
|
"595782", "Santiago", |
263
|
|
|
|
|
|
|
"59537", "Capitan\ Bado", |
264
|
|
|
|
|
|
|
"595453", "Capiibary", |
265
|
|
|
|
|
|
|
"59561", "Presidente\ Franco", |
266
|
|
|
|
|
|
|
"595633", "Cedrales", |
267
|
|
|
|
|
|
|
"59548", "Curuguaty", |
268
|
|
|
|
|
|
|
"59528", "Capiata", |
269
|
|
|
|
|
|
|
"595783", "San\ Miguel\ \/\ Misiones", |
270
|
|
|
|
|
|
|
"595271", "Benjamin\ \ Aceval", |
271
|
|
|
|
|
|
|
"59572", "Ayolas", |
272
|
|
|
|
|
|
|
"595741", "Coronel\ Bogado", |
273
|
|
|
|
|
|
|
"59543", "San\ Estanislao", |
274
|
|
|
|
|
|
|
"595632", "Colonia\ Yguazu", |
275
|
|
|
|
|
|
|
"595275", "Ypane", |
276
|
|
|
|
|
|
|
"59571", "Capitan\ Miranda", |
277
|
|
|
|
|
|
|
"595780", "Alberdi", |
278
|
|
|
|
|
|
|
"59535", "Valle\ Mi", |
279
|
|
|
|
|
|
|
"59586", "Pilar", |
280
|
|
|
|
|
|
|
"595781", "Santa\ MarĂa\ \/\ Misiones", |
281
|
|
|
|
|
|
|
"595784", "San\ Juan\ Neembucu", |
282
|
|
|
|
|
|
|
"595740", "General\ \ Delgado", |
283
|
|
|
|
|
|
|
"595785", "Paso\ De\ Patria", |
284
|
|
|
|
|
|
|
"59544", "Villa\ Del\ Rosario", |
285
|
|
|
|
|
|
|
"59582", "San\ Ignacio\ \/\ Misiones", |
286
|
|
|
|
|
|
|
"59524", "Ita", |
287
|
|
|
|
|
|
|
"595743", "General\ Artigas", |
288
|
|
|
|
|
|
|
"59581", "San\ Juan\ Bautista\ \/\ Misiones",}; |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
sub new { |
291
|
16
|
|
|
16
|
1
|
37
|
my $class = shift; |
292
|
16
|
|
|
|
|
40
|
my $number = shift; |
293
|
16
|
|
|
|
|
105
|
$number =~ s/(^\+595|\D)//g; |
294
|
16
|
|
|
|
|
85
|
my $self = bless({ country_code => '595', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
295
|
16
|
100
|
|
|
|
77
|
return $self if ($self->is_valid()); |
296
|
1
|
|
|
|
|
2
|
$number =~ s/^(?:0)//; |
297
|
1
|
|
|
|
|
11
|
$self = bless({ country_code => '595', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
298
|
1
|
50
|
|
|
|
6
|
return $self->is_valid() ? $self : undef; |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
1; |