blib/lib/Number/Phone/StubCountry/PY.pm

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