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
|
|
1175
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
247
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
48
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
46
|
|
24
|
2
|
|
|
2
|
|
19
|
use utf8; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
11
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181422; |
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} = {"59572", "Ayolas", |
217
|
|
|
|
|
|
|
"59538", "Bella\ Vista\ Norte", |
218
|
|
|
|
|
|
|
"595453", "Capiibary", |
219
|
|
|
|
|
|
|
"595673", "Santa\ Rita", |
220
|
|
|
|
|
|
|
"59535", "Valle\ Mi", |
221
|
|
|
|
|
|
|
"59531", "Concepcion", |
222
|
|
|
|
|
|
|
"595552", "Paso\ Yobay", |
223
|
|
|
|
|
|
|
"595742", "San\ Pedro\ Del\ Parana", |
224
|
|
|
|
|
|
|
"59544", "Villa\ Del\ Rosario", |
225
|
|
|
|
|
|
|
"595292", "Nueva\ Italia", |
226
|
|
|
|
|
|
|
"595768", "Pirapo", |
227
|
|
|
|
|
|
|
"595671", "Mayor\ Otano", |
228
|
|
|
|
|
|
|
"595780", "Alberdi", |
229
|
|
|
|
|
|
|
"595451", "Colonia\ Volendam", |
230
|
|
|
|
|
|
|
"595295", "Jose\ Augusto\ Saldivar", |
231
|
|
|
|
|
|
|
"595767", "Bella\ Vista\ Sur", |
232
|
|
|
|
|
|
|
"59546", "Salto\ Del\ Guaira", |
233
|
|
|
|
|
|
|
"595762", "Carmen\ Del\ Parana", |
234
|
|
|
|
|
|
|
"59583", "Villa\ Florida", |
235
|
|
|
|
|
|
|
"595632", "Colonia\ Yguazu", |
236
|
|
|
|
|
|
|
"595783", "San\ Miguel\ \/\ Misiones", |
237
|
|
|
|
|
|
|
"595764", "Maria\ Auxiliadora", |
238
|
|
|
|
|
|
|
"59526", "Villa\ Hayes", |
239
|
|
|
|
|
|
|
"595294", "Itaugua", |
240
|
|
|
|
|
|
|
"59542", "San\ Pedro\ Del\ Ycua\ Mandyju", |
241
|
|
|
|
|
|
|
"59585", "Santa\ Rosa\ \/\ Misiones", |
242
|
|
|
|
|
|
|
"59581", "San\ Juan\ Bautista\ \/\ Misiones", |
243
|
|
|
|
|
|
|
"595275", "Ypane", |
244
|
|
|
|
|
|
|
"595554", "Itape", |
245
|
|
|
|
|
|
|
"59533", "Loreto", |
246
|
|
|
|
|
|
|
"595676", "Naranjal", |
247
|
|
|
|
|
|
|
"59524", "Ita", |
248
|
|
|
|
|
|
|
"59561", "Presidente\ Franco", |
249
|
|
|
|
|
|
|
"59547", "Puente\ Kyha", |
250
|
|
|
|
|
|
|
"595781", "Santa\ MarĂa\ \/\ Misiones", |
251
|
|
|
|
|
|
|
"59571", "Capitan\ Miranda", |
252
|
|
|
|
|
|
|
"595678", "Santa\ Rosa\ Del\ Monday", |
253
|
|
|
|
|
|
|
"595761", "Colonia\ Fram", |
254
|
|
|
|
|
|
|
"59575", "Hoenau", |
255
|
|
|
|
|
|
|
"595677", "San\ Alberto", |
256
|
|
|
|
|
|
|
"595672", "Kressburgo", |
257
|
|
|
|
|
|
|
"595553", "Tebicuary", |
258
|
|
|
|
|
|
|
"595743", "General\ Artigas", |
259
|
|
|
|
|
|
|
"59532", "Horqueta", |
260
|
|
|
|
|
|
|
"595345", "Corpus\ Christi", |
261
|
|
|
|
|
|
|
"595675", "Juan\ Leon\ Mallorquin", |
262
|
|
|
|
|
|
|
"595291", "Aregua", |
263
|
|
|
|
|
|
|
"595293", "Guarambare", |
264
|
|
|
|
|
|
|
"595741", "Coronel\ Bogado", |
265
|
|
|
|
|
|
|
"59528", "Capiata", |
266
|
|
|
|
|
|
|
"59586", "Pilar", |
267
|
|
|
|
|
|
|
"59537", "Capitan\ Bado", |
268
|
|
|
|
|
|
|
"595784", "San\ Juan\ Neembucu", |
269
|
|
|
|
|
|
|
"59525", "Villeta", |
270
|
|
|
|
|
|
|
"59543", "San\ Estanislao", |
271
|
|
|
|
|
|
|
"59521", "Fernando\ De\ La\ Mora\,\ Lambare\,\ Limpio\,\ Luque\,\ Mariano\ Roque\ Alonso\,\ San\ Antonio\,\ Valle\ Pucu\ and\ Villa\ Elisa", |
272
|
|
|
|
|
|
|
"59564", "Cargil", |
273
|
|
|
|
|
|
|
"595763", "La\ Paz", |
274
|
|
|
|
|
|
|
"595633", "Cedrales", |
275
|
|
|
|
|
|
|
"595782", "Santiago", |
276
|
|
|
|
|
|
|
"595787", "General\ \ Diaz", |
277
|
|
|
|
|
|
|
"59548", "Curuguaty", |
278
|
|
|
|
|
|
|
"595785", "Paso\ De\ Patria", |
279
|
|
|
|
|
|
|
"59539", "Yby\ Ja\'U", |
280
|
|
|
|
|
|
|
"59541", "Itacurubi\ Del\ Rosario", |
281
|
|
|
|
|
|
|
"59582", "San\ Ignacio\ \/\ Misiones", |
282
|
|
|
|
|
|
|
"59573", "San\ Cosme", |
283
|
|
|
|
|
|
|
"595740", "General\ \ Delgado", |
284
|
|
|
|
|
|
|
"595550", "Mauricio\ Jose\ Troche", |
285
|
|
|
|
|
|
|
"595631", "Hernandarias", |
286
|
|
|
|
|
|
|
"595271", "Benjamin\ \ Aceval", |
287
|
|
|
|
|
|
|
"59536", "Pedro\ Juan\ Caballero", |
288
|
|
|
|
|
|
|
"595674", "Juan\ E\.\ O\ Leary",}; |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
sub new { |
291
|
16
|
|
|
16
|
1
|
37
|
my $class = shift; |
292
|
16
|
|
|
|
|
20
|
my $number = shift; |
293
|
16
|
|
|
|
|
107
|
$number =~ s/(^\+595|\D)//g; |
294
|
16
|
|
|
|
|
83
|
my $self = bless({ country_code => '595', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
295
|
16
|
100
|
|
|
|
78
|
return $self if ($self->is_valid()); |
296
|
1
|
|
|
|
|
2
|
$number =~ s/^(?:0)//; |
297
|
1
|
|
|
|
|
9
|
$self = bless({ country_code => '595', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
298
|
1
|
50
|
|
|
|
4
|
return $self->is_valid() ? $self : undef; |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
1; |