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

filter: Statementstmt 100% 28 / 28 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 97.4% 38 / 39 CC 3 SCAR 5.6
CC
3
Cov
97%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« blib/lib/Number/Phone/StubCountry/NL.pm ↑ Summary blib/lib/Number/Phone/NANP.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::IE;
20 4 ▶use base qw(Number::Phone::StubCountry);
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 4 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 4 our $VERSION = 1.20260904101550;
26  
27 4 my $formatters = [
28 {
29 'format' => '$1 $2',
30 'leading_digits' => '
31 2[24-9]|
32 47|
33 58|
34 6[237-9]|
35 9[35-9]
36 ',
37 'national_rule' => '(0$1)',
38 'pattern' => '(\\d{2})(\\d{5})'
39 },
40 {
41 'format' => '$1 $2',
42 'leading_digits' => '[45]0',
43 'national_rule' => '(0$1)',
44 'pattern' => '(\\d{3})(\\d{5})'
45 },
46 {
47 'format' => '$1 $2 $3',
48 'leading_digits' => '1',
49 'national_rule' => '(0$1)',
50 'pattern' => '(\\d)(\\d{3,4})(\\d{4})'
51 },
52 {
53 'format' => '$1 $2 $3',
54 'leading_digits' => '
55 [2569]|
56 4[1-69]|
57 7[14]
58 ',
59 'national_rule' => '(0$1)',
60 'pattern' => '(\\d{2})(\\d{3})(\\d{3,4})'
61 },
62 {
63 'format' => '$1 $2 $3',
64 'leading_digits' => '70',
65 'national_rule' => '0$1',
66 'pattern' => '(\\d{3})(\\d{3})(\\d{3})'
67 },
68 {
69 'format' => '$1 $2 $3',
70 'leading_digits' => '81',
71 'national_rule' => '(0$1)',
72 'pattern' => '(\\d{3})(\\d{3})(\\d{3})'
73 },
74 {
75 'format' => '$1 $2 $3',
76 'leading_digits' => '[78]',
77 'national_rule' => '0$1',
78 'pattern' => '(\\d{2})(\\d{3})(\\d{4})'
79 },
80 {
81 'format' => '$1 $2 $3',
82 'leading_digits' => '1',
83 'pattern' => '(\\d{4})(\\d{3})(\\d{3})'
84 },
85 {
86 'format' => '$1 $2 $3',
87 'leading_digits' => '4',
88 'national_rule' => '(0$1)',
89 'pattern' => '(\\d{2})(\\d{4})(\\d{4})'
90 },
91 {
92 'format' => '$1 $2 $3 $4',
93 'leading_digits' => '8',
94 'national_rule' => '0$1',
95 'pattern' => '(\\d{2})(\\d)(\\d{3})(\\d{4})'
96 }
97 ];
98  
99 4 my $validators = {
100 'fixed_line' => '
101 (?:
102 1\\d|
103 21
104 )\\d{6,7}|
105 (?:
106 2[24-9]|
107 4(?:
108 0[24]|
109 5\\d|
110 7
111 )|
112 5(?:
113 0[45]|
114 1\\d|
115 8
116 )|
117 6(?:
118 1\\d|
119 [237-9]
120 )|
121 9(?:
122 1\\d|
123 [35-9]
124 )
125 )\\d{5}|
126 (?:
127 23|
128 4(?:
129 [1-469]|
130 8\\d
131 )|
132 5[23679]|
133 6[4-6]|
134 7[14]|
135 9[04]
136 )\\d{7}
137 ',
138 'geographic' => '
139 (?:
140 1\\d|
141 21
142 )\\d{6,7}|
143 (?:
144 2[24-9]|
145 4(?:
146 0[24]|
147 5\\d|
148 7
149 )|
150 5(?:
151 0[45]|
152 1\\d|
153 8
154 )|
155 6(?:
156 1\\d|
157 [237-9]
158 )|
159 9(?:
160 1\\d|
161 [35-9]
162 )
163 )\\d{5}|
164 (?:
165 23|
166 4(?:
167 [1-469]|
168 8\\d
169 )|
170 5[23679]|
171 6[4-6]|
172 7[14]|
173 9[04]
174 )\\d{7}
175 ',
176 'mobile' => '
177 8(?:
178 22|
179 [35-9]\\d
180 )\\d{6}
181 ',
182 'pager' => '',
183 'personal_number' => '700\\d{6}',
184 'specialrate' => '(18[59]0\\d{6})|(
185 15(?:
186 1[2-8]|
187 [2-8]0|
188 9[089]
189 )\\d{6}
190 )|(818\\d{6})',
191 'toll_free' => '1800\\d{6}',
192 'voip' => '76\\d{7}'
193 };
194 4 my %areanames = ();
195 4 $areanames{en} = {"35321", "Cork",
196 "3536690", "Killorglin",
197 "353459", "Naas",
198 "353623", "Tipperary",
199 "353616", "Scariff",
200 "353579901", "Portlaoise",
201 "3535987", "Athy",
202 "35327", "Bantry",
203 "353451", "Naas\/Kildare\/Curragh",
204 "3532140", "Kinsale",
205 "35371931", "Sligo",
206 "353569900", "Kilkenny",
207 "3535274", "Cahir",
208 "353570", "Portlaoise",
209 "3536693", "Dingle",
210 "3537491", "Letterkenny",
211 "3536299", "Tipperary",
212 "35399", "Kilronan",
213 "353561", "Kilkenny",
214 "353455", "Kildare",
215 "3534999", "Cavan\/Cootehill\/Oldcastle\/Belturbet",
216 "353740", "Letterkenny",
217 "3535791", "Birr",
218 "3534497", "Castlepollard",
219 "353425", "Castleblaney",
220 "3536599", "Ennis\/Ennistymon\/Kilrush",
221 "353749211", "Letterkenny",
222 "353493", "Belturbet",
223 "35371959", "Carrick\-on\-Shannon",
224 "353653", "Ennis",
225 "353464", "Trim",
226 "3536696", "Cahirciveen",
227 "3531", "Dublin",
228 "353421", "Dundalk\/Carrickmacross\/Castleblaney",
229 "353901", "Athlone",
230 "353498", "Oldcastle",
231 "353497", "Cavan",
232 "3534330", "Longford",
233 "353719331", "Sligo",
234 "353657", "Ennistymon",
235 "353658", "Kilrush",
236 "353909900", "Athlone",
237 "3534333", "Longford",
238 "353719900", "Sligo",
239 "35374", "Letterkenny\/Donegal\/Dungloe\/Buncrana",
240 "353650", "Ennis\/Ennistymon\/Kilrush",
241 "353466", "Edenderry",
242 "353490", "Cavan\/Cootehill\/Oldcastle\/Belturbet",
243 "353504", "Thurles",
244 "3534697", "Edenderry",
245 "35351999", "Waterford\/Carrick\-on\-Suir\/New\ Ross\/Kilmacthomas",
246 "353472", "Clones",
247 "353711", "Sligo",
248 "35357859", "Portlaoise",
249 "3536477", "Rathmore",
250 "353620", "Tipperary\/Cashel",
251 "353218", "Cork\/Kinsale\/Coachford",
252 "3534295", "Carrickmacross",
253 "353217", "Coachford",
254 "353531", "Wexford",
255 "35351", "Waterford",
256 "353912", "Gort",
257 "35357", "Portlaoise\/Abbeyleix\/Tullamore\/Birr",
258 "353539900", "Wexford",
259 "353949291", "Castlebar",
260 "35371930", "Sligo",
261 "3536698", "Killorglin",
262 "3536694", "Cahirciveen",
263 "353628", "Tipperary",
264 "353627", "Cashel",
265 "353422", "Dundalk",
266 "353447", "Castlepollard",
267 "353654", "Ennis",
268 "353448", "Tyrellspass",
269 "3534492", "Tyrellspass",
270 "353463", "Navan\/Kells\/Trim\/Edenderry\/Enfield",
271 "353719332", "Sligo",
272 "3535786", "Portlaoise",
273 "353438", "Granard",
274 "353437", "Granard",
275 "3534290", "Dundalk",
276 "353494", "Cavan",
277 "3534699", "Navan\/Kells\/Trim\/Edenderry\/Enfield",
278 "35343669", "Granard",
279 "3537198", "Manorhamilton",
280 "3534293", "Dundalk",
281 "3537497", "Donegal",
282 "353646701", "Killarney",
283 "353719335", "Sligo",
284 "353949285", "Castlebar",
285 "353516", "Carrick\-on\-Suir",
286 "3534491", "Tyrellspass",
287 "3535394", "Gorey",
288 "35396", "Ballina",
289 "353624", "Tipperary",
290 "3534296", "Carrickmacross",
291 "353452", "Kildare",
292 "35343668", "Granard",
293 "35352", "Clonmel\/Cahir\/Killenaule",
294 "3534510", "Kildare",
295 "35374920", "Letterkenny",
296 "3535677", "Kilkenny",
297 "3535393", "Ferns",
298 "353402", "Arklow",
299 "35367", "Nenagh",
300 "3535989", "Athy",
301 "35361", "Limerick",
302 "353514", "New\ Ross",
303 "353719344", "Sligo",
304 "3539096", "Ballinasloe",
305 "353949289", "Castlebar",
306 "35322", "Mallow",
307 "3537196", "Carrick\-on\-Shannon",
308 "35357850", "Portlaoise",
309 "3535390", "Wexford",
310 "3534691", "Navan",
311 "35393", "Tuam",
312 "353626", "Cashel",
313 "353949288", "Castlebar",
314 "35394", "Castlebar\/Claremorris\/Castlerea\/Ballinrobe",
315 "3534499", "Mullingar\/Castlepollard\/Tyrrellspass",
316 "353471", "Monaghan\/Clones",
317 "35325", "Fermoy",
318 "353496", "Cavan",
319 "35344", "Mullingar",
320 "3536695", "Cahirciveen",
321 "353656", "Ennis",
322 "353460", "Navan",
323 "3534120", "Drogheda\/Ardee",
324 "353479", "Monaghan",
325 "3534368", "Granard",
326 "35343", "Longford\/Granard",
327 "35361999", "Limerick\/Scariff",
328 "353475", "Clones",
329 "353719401", "Sligo",
330 "353468", "Navan",
331 "3534692", "Kells",
332 "353467", "Navan",
333 "353443", "Mullingar\/Castlepollard\/Tyrrellspass",
334 "3534298", "Castleblaney",
335 "35398", "Westport",
336 "3535291", "Killenaule",
337 "3534294", "Dundalk",
338 "353469901", "Navan",
339 "353669100", "Killorglin",
340 "353749212", "Letterkenny",
341 "35391", "Galway",
342 "353668", "Tralee\/Dingle\/Killorglin\/Cahersiveen",
343 "3536692", "Dingle",
344 "353404", "Wicklow",
345 "353512", "Kilmacthomas",
346 "35397", "Belmullet",
347 "35364", "Killarney\/Rathmore",
348 "353619", "Scariff",
349 "353909903", "Ballinasloe",
350 "3535793", "Tullamore",
351 "353646700", "Killarney",
352 "3534695", "Enfield",
353 "353456", "Naas",
354 "353539902", "Enniscorthy",
355 "35329", "Kanturk",
356 "3535787", "Abbeyleix",
357 "35363", "Rathluirc",
358 "35371932", "Sligo",
359 "353749889", "Letterkenny",
360 "3537493", "Buncrana",
361 "3534297", "Castleblaney",
362 "3536691", "Dingle",
363 "353473", "Monaghan",
364 "353949287", "Castlebar",
365 "353426", "Dundalk",
366 "353749888", "Letterkenny",
367 "3534799", "Monaghan\/Clones",
368 "353539903", "Gorey",
369 "3532141", "Kinsale",
370 "353505", "Roscrea",
371 "35341", "Drogheda",
372 "353909902", "Ballinasloe",
373 "3535991", "Carlow",
374 "353719334", "Sligo",
375 "35368", "Listowel",
376 "3534367", "Granard",
377 "3534199", "Drogheda\/Ardee",
378 "353909897", "Athlone",
379 "353461", "Navan",
380 "353652", "Ennis",
381 "353424", "Carrickmacross",
382 "353749214", "Letterkenny",
383 "3534332", "Longford",
384 "353470", "Monaghan\/Clones",
385 "353469900", "Navan",
386 "353492", "Cootehill",
387 "353477", "Monaghan",
388 "353478", "Monaghan",
389 "3536466", "Killarney",
390 "3539495", "Ballinrobe",
391 "353465", "Enfield",
392 "353719010", "Sligo",
393 "353531203", "Gorey",
394 "3539097", "Portumna",
395 "35394925", "Castlebar",
396 "3534331", "Longford",
397 "3536699", "Tralee\/Dingle\/Killorglin\/Cahersiveen",
398 "35366", "Tralee",
399 "353918", "Loughrea",
400 "35343667", "Granard",
401 "3534495", "Castlepollard",
402 "3535688", "Freshford",
403 "3535678", "Kilkenny",
404 "353454", "The\ Curragh",
405 "353622", "Cashel",
406 "35374989", "Letterkenny",
407 "3534791", "Monaghan\/Clones",
408 "353531202", "Enniscorthy",
409 "3535964", "Baltinglass",
410 "35359", "Carlow\/Muine\ Bheag\/Athy\/Baltinglass",
411 "35374960", "Letterkenny",
412 "353741", "Letterkenny",
413 "3534490", "Tyrellspass",
414 "353432", "Longford",
415 "3539496", "Castlerea",
416 "3534694", "Trim",
417 "35371", "Sligo\/Manorhamilton\/Carrick\-on\-Shannon",
418 "3534698", "Edenderry",
419 "353749210", "Letterkenny",
420 "35390650", "Athlone",
421 "353427", "Dundalk",
422 "353428", "Dundalk",
423 "353749900", "Letterkenny",
424 "3534292", "Dundalk",
425 "353949286", "Castlebar",
426 "35358", "Dungarvan",
427 "353469907", "Edenderry",
428 "3539064", "Athlone",
429 "35390", "Athlone\/Ballinasloe\/Portumna\/Roscommon",
430 "353420", "Dundalk\/Carrickmacross\/Castleblaney",
431 "3535986", "Athy",
432 "353474", "Clones",
433 "3535644", "Castlecomer",
434 "353450", "Naas\/Kildare\/Curragh",
435 "35343666", "Granard",
436 "3536697", "Killorglin",
437 "353569901", "Kilkenny",
438 "3534291", "Dundalk",
439 "3539493", "Claremorris",
440 "35326", "Macroom",
441 "353579900", "Portlaoise",
442 "35353", "Wexford\/Enniscorthy\/Ferns\/Gorey",
443 "3535997", "Muine\ Bheag",
444 "353560", "Kilkenny",
445 "3532147", "Kinsale",
446 "3536670", "Tralee\/Dingle\/Killorglin\/Cahersiveen",
447 "3539490", "Castlebar",
448 "353571", "Portlaoise",
449 "353458", "Naas",
450 "3534496", "Castlepollard",
451 "353457", "Naas",
452 "353916", "Gort",
453 "3539498", "Castlerea",
454 "353629", "Cashel",
455 "3537191", "Sligo",
456 "35356", "Kilkenny\/Castlecomer\/Freshford",
457 "353453", "The\ Curragh",
458 "353621", "Tipperary\/Cashel",
459 "3534696", "Enfield",
460 "353530", "Wexford",
461 "353539901", "Wexford",
462 "3539066", "Roscommon",
463 "3535392", "Enniscorthy",
464 "353949290", "Castlebar",
465 "35323", "Bandon",
466 "35369", "Newcastle\ West",
467 "3537495", "Dungloe",
468 "3535988", "Athy",
469 "35324", "Youghal",
470 "353625", "Tipperary",
471 "353495", "Cootehill",
472 "35395", "Clifden",
473 "353578510", "Portlaoise",
474 "3534693", "Kells",
475 "353900", "Athlone",
476 "3535261", "Clonmel",
477 "353655", "Ennis",
478 "3534299", "Dundalk\/Carrickmacross\/Castleblaney",
479 "353719330", "Sligo",
480 "3535391", "Wexford",
481 "3534690", "Navan",
482 "353491", "Cavan\/Cootehill\/Oldcastle\/Belturbet",
483 "353476", "Monaghan",
484 "353710", "Sligo",
485 "353909901", "Athlone",
486 "3534369", "Granard",
487 "353659", "Kilrush",
488 "35328", "Skibbereen",
489 "3534498", "Castlepollard",
490 "353416", "Ardee",
491 "353499", "Belturbet",
492 "353423", "Dundalk\/Carrickmacross\/Castleblaney",
493 "353462", "Kells",
494 "353651", "Ennis\/Ennistymon\/Kilrush",};
495 4 my $timezones = {
496 '' => [
497 'Europe/Guernsey',
498 'Europe/Isle_of_Man',
499 'Europe/London'
500 ],
501 '539253' => [
502 'Europe/Guernsey',
503 'Europe/Isle_of_Man',
504 'Europe/London'
505 ]
506 };
507 73 ▶sub _may_be_noncanonical_number { 1 }
Subroutine _may_be_noncanonical_number: called CC=1 SCAR=0.0
508  
509 90 ▶ sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
510 90 my $class = shift;
511 90 my $number = shift;
512 90 $number =~ s/(^\+353|\D)//g;
513 90 my $self = bless({ country_code => '353', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
514 90 ▶ return $self if ($self->is_valid());
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_valid 88 2 90
515 2 $number =~ s/^(?:0)//;
516 2 $self = bless({ country_code => '353', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
517 2 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 0 2 2
518 }
519 4 1;
« blib/lib/Number/Phone/StubCountry/NL.pm ↑ Summary blib/lib/Number/Phone/NANP.pm »