blib/lib/Number/Phone/StubCountry/ZW.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/ZM.pm ↑ Summary blib/lib/Number/Phone/StubCountry/AM.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::ZW;
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.20260904101552;
26  
27 2 my $formatters = [
28 {
29 'format' => '$1 $2',
30 'leading_digits' => '
31 1|
32 2(?:
33 0[0-36-9]|
34 29|
35 58
36 )|
37 67[0-46-9]|
38 (?:
39 55|
40 68
41 )[0-69]
42 ',
43 'national_rule' => '0$1',
44 'pattern' => '(\\d{2})(\\d{3,5})'
45 },
46 {
47 'format' => '$1 $2',
48 'leading_digits' => '
49 2(?:
50 0[45]|
51 [27]|
52 48
53 )|
54 37|
55 675|
56 (?:
57 55|
58 68
59 )[78]
60 ',
61 'national_rule' => '0$1',
62 'pattern' => '(\\d{3})(\\d{3,5})'
63 },
64 {
65 'format' => '$1 $2 $3',
66 'leading_digits' => '[49]',
67 'national_rule' => '0$1',
68 'pattern' => '(\\d)(\\d{3})(\\d{2,4})'
69 },
70 {
71 'format' => '$1 $2',
72 'leading_digits' => '80',
73 'national_rule' => '0$1',
74 'pattern' => '(\\d{3})(\\d{4})'
75 },
76 {
77 'format' => '$1 $2',
78 'leading_digits' => '548',
79 'national_rule' => '0$1',
80 'pattern' => '(\\d{4})(\\d{3,5})'
81 },
82 {
83 'format' => '$1 $2 $3',
84 'leading_digits' => '29[013-9]',
85 'national_rule' => '0$1',
86 'pattern' => '(\\d{2})(\\d{3})(\\d{3,4})'
87 },
88 {
89 'format' => '$1 $2',
90 'leading_digits' => '
91 [256]|
92 39|
93 8[13-59]
94 ',
95 'national_rule' => '(0$1)',
96 'pattern' => '(\\d{2})(\\d{7})'
97 },
98 {
99 'format' => '$1 $2 $3',
100 'leading_digits' => '7',
101 'national_rule' => '0$1',
102 'pattern' => '(\\d{2})(\\d{3})(\\d{4})'
103 },
104 {
105 'format' => '$1 $2 $3',
106 'leading_digits' => '3',
107 'national_rule' => '0$1',
108 'pattern' => '(\\d{3})(\\d{3})(\\d{3,4})'
109 },
110 {
111 'format' => '$1 $2',
112 'leading_digits' => '8',
113 'national_rule' => '0$1',
114 'pattern' => '(\\d{4})(\\d{6})'
115 }
116 ];
117  
118 2 my $validators = {
119 'fixed_line' => '
120 (?:
121 2(?:
122 (?:
123 (?:
124 02[014]|
125 72[03]
126 )\\d|
127 48
128 )\\d|
129 2(?:
130 [278]\\d|
131 92
132 )|
133 583
134 )|
135 (?:
136 37[56]|
137 6[78]21\\d
138 )\\d|
139 5(?:
140 483|
141 525\\d\\d
142 )
143 )\\d{3}|
144 (?:
145 2(?:
146 0\\d|
147 7[1-7]
148 )|
149 (?:
150 55|
151 6[78]
152 )\\d
153 )\\d{4}|
154 (?:
155 13|
156 2(?:
157 (?:
158 42|
159 9\\d
160 )\\d|
161 [56]20
162 )|
163 3(?:
164 123|
165 92\\d
166 )|
167 (?:
168 4|
169 542
170 )\\d|
171 6(?:
172 [16]21|
173 52[013]
174 )|
175 8(?:
176 [1349]28|
177 523
178 )|
179 9[2-9]
180 )\\d{5}
181 ',
182 'geographic' => '
183 (?:
184 2(?:
185 (?:
186 (?:
187 02[014]|
188 72[03]
189 )\\d|
190 48
191 )\\d|
192 2(?:
193 [278]\\d|
194 92
195 )|
196 583
197 )|
198 (?:
199 37[56]|
200 6[78]21\\d
201 )\\d|
202 5(?:
203 483|
204 525\\d\\d
205 )
206 )\\d{3}|
207 (?:
208 2(?:
209 0\\d|
210 7[1-7]
211 )|
212 (?:
213 55|
214 6[78]
215 )\\d
216 )\\d{4}|
217 (?:
218 13|
219 2(?:
220 (?:
221 42|
222 9\\d
223 )\\d|
224 [56]20
225 )|
226 3(?:
227 123|
228 92\\d
229 )|
230 (?:
231 4|
232 542
233 )\\d|
234 6(?:
235 [16]21|
236 52[013]
237 )|
238 8(?:
239 [1349]28|
240 523
241 )|
242 9[2-9]
243 )\\d{5}
244 ',
245 'mobile' => '
246 7(?:
247 [1278]\\d|
248 3[1-9]|
249 9[01]
250 )\\d{6}
251 ',
252 'pager' => '',
253 'personal_number' => '',
254 'specialrate' => '',
255 'toll_free' => '
256 80(?:
257 [01]\\d|
258 20|
259 8[0-8]
260 )\\d{3}
261 ',
262 'voip' => '
263 86(?:
264 1[12]|
265 22|
266 30|
267 44|
268 55|
269 77|
270 8[368]
271 )\\d{6}
272 '
273 };
274 2 my %areanames = ();
275 2 $areanames{en} = {"263812847", "Binga",
276 "2636520", "Beatrice",
277 "263420108", "Norton",
278 "26329252", "Luveve",
279 "26325207", "Headlands",
280 "263542532", "Mvuma",
281 "263842808", "West\ Nicholson",
282 "263420109", "Norton",
283 "263275219", "Mazowe",
284 "2636523", "Marondera",
285 "26342722", "Chitungwiza",
286 "26327541", "Mt\.\ Darwin",
287 "263558", "Nkayi",
288 "26365208", "Wedza",
289 "26339234", "Jerera",
290 "263557", "Munyati",
291 "263392", "Masvingo",
292 "2638128", "Baobab\/Hwange",
293 "263271", "Bindura",
294 "26327524", "Mt\.\ Darwin",
295 "26361215", "Karoi",
296 "263548", "Lalapanzi",
297 "2636521", "Murewa",
298 "263542", "Gweru",
299 "263552557", "Munyati",
300 "26367215", "Murombedzi",
301 "263252055", "Nyazura",
302 "263312370", "Ngundu",
303 "2636821", "Kadoma\/Selous",
304 "26320200", "Odzi",
305 "26366213", "Banket",
306 "263943", "Mabutewni",
307 "26324215", "Norton",
308 "26339245", "Mashava",
309 "263612140", "Chirundu",
310 "26368216", "Sanyati",
311 "26367", "Chinhoyi",
312 "26339230", "Gutu",
313 "263947", "Bellevue",
314 "263392308", "Chatsworth",
315 "263248", "Birchenough\ Bridge",
316 "263948", "Nkulumane",
317 "263222", "Wedza",
318 "26329246", "Bellevue",
319 "263420087", "Selous",
320 "26327527", "Mt\.\ Darwin",
321 "2635525", "Battle\ Fields\/Kwekwe\/Redcliff",
322 "263292807", "Kezi",
323 "263652080", "Macheke",
324 "263420110", "Norton",
325 "263942", "Mabutewni",
326 "263228", "Hauna",
327 "263242", "Harare",
328 "263227", "Chipinge",
329 "263272317", "Checheche",
330 "263420106", "Norton",
331 "26327522", "Mt\.\ Darwin",
332 "263920", "Northend",
333 "26366219", "Christon\ Bank\/Concession\/Mazowe",
334 "26339235", "Zvishavane",
335 "263682189", "Chakari",
336 "263940", "Mabutewni",
337 "263274", "Arcturus",
338 "26383", "Victoria\ Falls",
339 "263292804", "Figtree",
340 "263392323", "Nyika",
341 "26367214", "Banket\/Mhangura",
342 "26366216", "Mvurwi",
343 "263242150", "Beatrice",
344 "26385", "BeitBridge",
345 "26354212", "Chivhu",
346 "26327525", "Mt\.\ Darwin",
347 "26366218", "Glendale",
348 "263952", "Luveve",
349 "263812835", "Dete",
350 "26324214", "Arcturus",
351 "26355259", "Gokwe",
352 "26342010", "Selous",
353 "263258", "Nyazura",
354 "26327540", "Mt\.\ Darwin",
355 "26365213", "Mutoko",
356 "26355", "Kwekwe",
357 "26327203", "Birchenough\ Bridge",
358 "263312337", "Rutenga",
359 "263292821", "Nyamandlovu",
360 "26366211", "Banket",
361 "263924", "Hillside",
362 "2639228", "Queensdale",
363 "2632620", "Chimanimani",
364 "263612141", "Makuti",
365 "26327526", "Mt\.\ Darwin",
366 "26324213", "Ruwa",
367 "263672198", "Raffingora",
368 "26327204", "Chipinge",
369 "26366215", "Banket",
370 "26327528", "Mt\.\ Darwin",
371 "263292800", "Esigodini",
372 "263392366", "Mataga",
373 "263277", "Mvurwi",
374 "26342723", "Chitungwiza",
375 "2632021", "Dangamvura",
376 "263842801", "Filabusi",
377 "263272", "Mutoko",
378 "26326208", "Juliasdale",
379 "2632753", "Mt\.\ Darwin",
380 "26354252", "Shurugwi",
381 "263272046", "Chipangayi",
382 "263687", "Sanyati",
383 "263688", "Chakari",
384 "263375", "Concession",
385 "26366217", "Guruve",
386 "263376", "Glendale",
387 "263842835", "Collen\ Bawn",
388 "263205", "Pengalonga",
389 "263292861", "Tsholotsho",
390 "263206", "Mutare",
391 "2633123", "Chiredzi",
392 "263542548", "Lalapanzi",
393 "26366212", "Mount\ Darwin",
394 "263292809", "Matopos",
395 "263420088", "Selous",
396 "26389280", "Plumtree",
397 "26327529", "Mt\.\ Darwin",
398 "26326209", "Hauna",
399 "263662137", "Shamva",
400 "263420089", "Selous",
401 "263672136", "Trelawney",
402 "2632020", "Mutare",
403 "26366214", "Banket",
404 "26327205", "Chimanimani",
405 "2636121", "Kariba",
406 "263262098", "Nyanga",
407 "26325206", "Murambinda",
408 "2631", "Victoria\ Falls",
409 "2632024", "Penhalonga",
410 "2639226", "Queensdale",
411 "263204", "Odzi",
412 "26368", "Kadoma",
413 "2632520", "Rusape",
414 "263292803", "Turkmine",
415 "2634", "Harare",
416 "263420085", "Selous",
417 "263672192", "Darwendale",
418 "26327523", "Mt\.\ Darwin",
419 "2632421", "Chitungwiza",
420 "26368215", "Chegutu",
421 "26342728", "Marondera",
422 "263672196", "Mutorashanga",
423 "263956", "Luveve",
424 "263552558", "Nkayi",
425 "263420086", "Selous",
426 "263946", "Bellevue",
427 "26366210", "Bindura\/Centenary",
428 "263273", "Ruwa",
429 "263292802", "Shangani",
430 "26329", "Bulawayo",
431 "263812856", "Lupane",
432 "26342009", "Selous",
433 "263392360", "Mberengwa",
434 "263812875", "Jotsholo",
435 "26342729", "Marondera",
436 "263941", "Mabutewni",
437 "263229", "Juliasdale",
438 "26331233", "Triangle",
439 "263929", "Killarney",
440 "2639", "Bulawayo",
441 "263420107", "Norton",
442 "263675", "Murombedzi",
443 "263392380", "Nyaningwe",
444 "263949", "Nkulumane",
445 "263921", "Northend",
446 "2638428", "Gwanda",};
447 2 my $timezones = {
448 '' => [
449 'Africa/Harare'
450 ]
451 };
452  
453 13 ▶ sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
454 13 my $class = shift;
455 13 my $number = shift;
456 13 $number =~ s/(^\+263|\D)//g;
457 13 my $self = bless({ country_code => '263', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
458 13 ▶ return $self if ($self->is_valid());
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_valid 12 1 13
459 1 $number =~ s/^(?:0)//;
460 1 $self = bless({ country_code => '263', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
461 1 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 0 1 1
462 }
463 2 1;
« blib/lib/Number/Phone/StubCountry/ZM.pm ↑ Summary blib/lib/Number/Phone/StubCountry/AM.pm »