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::IS; |
20
|
2
|
|
|
2
|
|
1217
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
234
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
18
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
56
|
|
23
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
54
|
|
24
|
2
|
|
|
2
|
|
12
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
12
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174403; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => '[4-9]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
35
|
|
|
|
|
|
|
'leading_digits' => '3', |
36
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{3})' |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
]; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $validators = { |
41
|
|
|
|
|
|
|
'fixed_line' => ' |
42
|
|
|
|
|
|
|
(?: |
43
|
|
|
|
|
|
|
4(?: |
44
|
|
|
|
|
|
|
1[0-24-69]| |
45
|
|
|
|
|
|
|
2[0-7]| |
46
|
|
|
|
|
|
|
[37][0-8]| |
47
|
|
|
|
|
|
|
4[0-24589]| |
48
|
|
|
|
|
|
|
5[0-68]| |
49
|
|
|
|
|
|
|
6\\d| |
50
|
|
|
|
|
|
|
8[0-36-8] |
51
|
|
|
|
|
|
|
)| |
52
|
|
|
|
|
|
|
5(?: |
53
|
|
|
|
|
|
|
05| |
54
|
|
|
|
|
|
|
[156]\\d| |
55
|
|
|
|
|
|
|
2[02578]| |
56
|
|
|
|
|
|
|
3[0-579]| |
57
|
|
|
|
|
|
|
4[03-7]| |
58
|
|
|
|
|
|
|
7[0-2578]| |
59
|
|
|
|
|
|
|
8[0-35-9]| |
60
|
|
|
|
|
|
|
9[013-689] |
61
|
|
|
|
|
|
|
)| |
62
|
|
|
|
|
|
|
872 |
63
|
|
|
|
|
|
|
)\\d{4} |
64
|
|
|
|
|
|
|
', |
65
|
|
|
|
|
|
|
'geographic' => ' |
66
|
|
|
|
|
|
|
(?: |
67
|
|
|
|
|
|
|
4(?: |
68
|
|
|
|
|
|
|
1[0-24-69]| |
69
|
|
|
|
|
|
|
2[0-7]| |
70
|
|
|
|
|
|
|
[37][0-8]| |
71
|
|
|
|
|
|
|
4[0-24589]| |
72
|
|
|
|
|
|
|
5[0-68]| |
73
|
|
|
|
|
|
|
6\\d| |
74
|
|
|
|
|
|
|
8[0-36-8] |
75
|
|
|
|
|
|
|
)| |
76
|
|
|
|
|
|
|
5(?: |
77
|
|
|
|
|
|
|
05| |
78
|
|
|
|
|
|
|
[156]\\d| |
79
|
|
|
|
|
|
|
2[02578]| |
80
|
|
|
|
|
|
|
3[0-579]| |
81
|
|
|
|
|
|
|
4[03-7]| |
82
|
|
|
|
|
|
|
7[0-2578]| |
83
|
|
|
|
|
|
|
8[0-35-9]| |
84
|
|
|
|
|
|
|
9[013-689] |
85
|
|
|
|
|
|
|
)| |
86
|
|
|
|
|
|
|
872 |
87
|
|
|
|
|
|
|
)\\d{4} |
88
|
|
|
|
|
|
|
', |
89
|
|
|
|
|
|
|
'mobile' => ' |
90
|
|
|
|
|
|
|
(?: |
91
|
|
|
|
|
|
|
38[589]\\d\\d| |
92
|
|
|
|
|
|
|
6(?: |
93
|
|
|
|
|
|
|
1[1-8]| |
94
|
|
|
|
|
|
|
2[0-6]| |
95
|
|
|
|
|
|
|
3[026-9]| |
96
|
|
|
|
|
|
|
4[014679]| |
97
|
|
|
|
|
|
|
5[0159]| |
98
|
|
|
|
|
|
|
6[0-69]| |
99
|
|
|
|
|
|
|
70| |
100
|
|
|
|
|
|
|
8[06-8]| |
101
|
|
|
|
|
|
|
9\\d |
102
|
|
|
|
|
|
|
)| |
103
|
|
|
|
|
|
|
7(?: |
104
|
|
|
|
|
|
|
5[057]| |
105
|
|
|
|
|
|
|
[6-9]\\d |
106
|
|
|
|
|
|
|
)| |
107
|
|
|
|
|
|
|
8(?: |
108
|
|
|
|
|
|
|
2[0-59]| |
109
|
|
|
|
|
|
|
[3-69]\\d| |
110
|
|
|
|
|
|
|
8[238] |
111
|
|
|
|
|
|
|
) |
112
|
|
|
|
|
|
|
)\\d{4} |
113
|
|
|
|
|
|
|
', |
114
|
|
|
|
|
|
|
'pager' => '', |
115
|
|
|
|
|
|
|
'personal_number' => '', |
116
|
|
|
|
|
|
|
'specialrate' => '( |
117
|
|
|
|
|
|
|
90(?: |
118
|
|
|
|
|
|
|
0\\d| |
119
|
|
|
|
|
|
|
1[5-79]| |
120
|
|
|
|
|
|
|
2[015-79]| |
121
|
|
|
|
|
|
|
3[135-79]| |
122
|
|
|
|
|
|
|
4[125-7]| |
123
|
|
|
|
|
|
|
5[25-79]| |
124
|
|
|
|
|
|
|
7[1-37]| |
125
|
|
|
|
|
|
|
8[0-35-7] |
126
|
|
|
|
|
|
|
)\\d{3} |
127
|
|
|
|
|
|
|
)|(809\\d{4})', |
128
|
|
|
|
|
|
|
'toll_free' => '80[0-8]\\d{4}', |
129
|
|
|
|
|
|
|
'voip' => '49[0-24-79]\\d{4}' |
130
|
|
|
|
|
|
|
}; |
131
|
|
|
|
|
|
|
my %areanames = (); |
132
|
|
|
|
|
|
|
$areanames{en} = {"35446", "Akureyri", |
133
|
|
|
|
|
|
|
"35456", "Reykjavík\/Vesturbær\/Miðbærinn", |
134
|
|
|
|
|
|
|
"35442", "Keflavík", |
135
|
|
|
|
|
|
|
"3545", "Reykjavík", |
136
|
|
|
|
|
|
|
"35455", "Reykjavík\/Vesturbær\/Miðbærinn",}; |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
sub new { |
139
|
19
|
|
|
19
|
1
|
47
|
my $class = shift; |
140
|
19
|
|
|
|
|
33
|
my $number = shift; |
141
|
19
|
|
|
|
|
117
|
$number =~ s/(^\+354|\D)//g; |
142
|
19
|
|
|
|
|
122
|
my $self = bless({ country_code => '354', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
143
|
19
|
100
|
|
|
|
93
|
return $self->is_valid() ? $self : undef; |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
1; |