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