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::EE; |
20
|
2
|
|
|
2
|
|
1208
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
230
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
28
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
51
|
|
23
|
2
|
|
|
2
|
|
15
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
50
|
|
24
|
2
|
|
|
2
|
|
12
|
use utf8; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
10
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131447; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
[369]| |
32
|
|
|
|
|
|
|
4[3-8]| |
33
|
|
|
|
|
|
|
5(?: |
34
|
|
|
|
|
|
|
[02]| |
35
|
|
|
|
|
|
|
1(?: |
36
|
|
|
|
|
|
|
[0-8]| |
37
|
|
|
|
|
|
|
95 |
38
|
|
|
|
|
|
|
)| |
39
|
|
|
|
|
|
|
5[0-478]| |
40
|
|
|
|
|
|
|
6(?: |
41
|
|
|
|
|
|
|
4[0-4]| |
42
|
|
|
|
|
|
|
5[1-589] |
43
|
|
|
|
|
|
|
) |
44
|
|
|
|
|
|
|
)| |
45
|
|
|
|
|
|
|
7[1-9]| |
46
|
|
|
|
|
|
|
88 |
47
|
|
|
|
|
|
|
', |
48
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
49
|
|
|
|
|
|
|
}, |
50
|
|
|
|
|
|
|
{ |
51
|
|
|
|
|
|
|
'format' => '$1 $2', |
52
|
|
|
|
|
|
|
'leading_digits' => ' |
53
|
|
|
|
|
|
|
[45]| |
54
|
|
|
|
|
|
|
8(?: |
55
|
|
|
|
|
|
|
00[1-9]| |
56
|
|
|
|
|
|
|
[1-49] |
57
|
|
|
|
|
|
|
) |
58
|
|
|
|
|
|
|
', |
59
|
|
|
|
|
|
|
'pattern' => '(\\d{4})(\\d{3,4})' |
60
|
|
|
|
|
|
|
}, |
61
|
|
|
|
|
|
|
{ |
62
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
63
|
|
|
|
|
|
|
'leading_digits' => '7', |
64
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{2})(\\d{4})' |
65
|
|
|
|
|
|
|
}, |
66
|
|
|
|
|
|
|
{ |
67
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
68
|
|
|
|
|
|
|
'leading_digits' => '8', |
69
|
|
|
|
|
|
|
'pattern' => '(\\d{4})(\\d{3})(\\d{3})' |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
]; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
my $validators = { |
74
|
|
|
|
|
|
|
'fixed_line' => ' |
75
|
|
|
|
|
|
|
(?: |
76
|
|
|
|
|
|
|
3[23589]| |
77
|
|
|
|
|
|
|
4[3-8]| |
78
|
|
|
|
|
|
|
6\\d| |
79
|
|
|
|
|
|
|
7[1-9]| |
80
|
|
|
|
|
|
|
88 |
81
|
|
|
|
|
|
|
)\\d{5} |
82
|
|
|
|
|
|
|
', |
83
|
|
|
|
|
|
|
'geographic' => ' |
84
|
|
|
|
|
|
|
(?: |
85
|
|
|
|
|
|
|
3[23589]| |
86
|
|
|
|
|
|
|
4[3-8]| |
87
|
|
|
|
|
|
|
6\\d| |
88
|
|
|
|
|
|
|
7[1-9]| |
89
|
|
|
|
|
|
|
88 |
90
|
|
|
|
|
|
|
)\\d{5} |
91
|
|
|
|
|
|
|
', |
92
|
|
|
|
|
|
|
'mobile' => ' |
93
|
|
|
|
|
|
|
(?: |
94
|
|
|
|
|
|
|
5\\d{5}| |
95
|
|
|
|
|
|
|
8(?: |
96
|
|
|
|
|
|
|
1(?: |
97
|
|
|
|
|
|
|
0(?: |
98
|
|
|
|
|
|
|
000| |
99
|
|
|
|
|
|
|
[3-9]\\d\\d |
100
|
|
|
|
|
|
|
)| |
101
|
|
|
|
|
|
|
(?: |
102
|
|
|
|
|
|
|
1(?: |
103
|
|
|
|
|
|
|
0[236]| |
104
|
|
|
|
|
|
|
1\\d |
105
|
|
|
|
|
|
|
)| |
106
|
|
|
|
|
|
|
(?: |
107
|
|
|
|
|
|
|
2[0-59]| |
108
|
|
|
|
|
|
|
[3-79]\\d |
109
|
|
|
|
|
|
|
)\\d |
110
|
|
|
|
|
|
|
)\\d |
111
|
|
|
|
|
|
|
)| |
112
|
|
|
|
|
|
|
2(?: |
113
|
|
|
|
|
|
|
0(?: |
114
|
|
|
|
|
|
|
000| |
115
|
|
|
|
|
|
|
(?: |
116
|
|
|
|
|
|
|
19| |
117
|
|
|
|
|
|
|
[2-7]\\d |
118
|
|
|
|
|
|
|
)\\d |
119
|
|
|
|
|
|
|
)| |
120
|
|
|
|
|
|
|
(?: |
121
|
|
|
|
|
|
|
(?: |
122
|
|
|
|
|
|
|
[124-6]\\d| |
123
|
|
|
|
|
|
|
3[5-9] |
124
|
|
|
|
|
|
|
)\\d| |
125
|
|
|
|
|
|
|
7(?: |
126
|
|
|
|
|
|
|
[0-79]\\d| |
127
|
|
|
|
|
|
|
8[13-9] |
128
|
|
|
|
|
|
|
)| |
129
|
|
|
|
|
|
|
8(?: |
130
|
|
|
|
|
|
|
[2-6]\\d| |
131
|
|
|
|
|
|
|
7[01] |
132
|
|
|
|
|
|
|
) |
133
|
|
|
|
|
|
|
)\\d |
134
|
|
|
|
|
|
|
)| |
135
|
|
|
|
|
|
|
[349]\\d{4} |
136
|
|
|
|
|
|
|
) |
137
|
|
|
|
|
|
|
)\\d\\d| |
138
|
|
|
|
|
|
|
5(?: |
139
|
|
|
|
|
|
|
(?: |
140
|
|
|
|
|
|
|
[02]\\d| |
141
|
|
|
|
|
|
|
5[0-478] |
142
|
|
|
|
|
|
|
)\\d| |
143
|
|
|
|
|
|
|
1(?: |
144
|
|
|
|
|
|
|
[0-8]\\d| |
145
|
|
|
|
|
|
|
95 |
146
|
|
|
|
|
|
|
)| |
147
|
|
|
|
|
|
|
6(?: |
148
|
|
|
|
|
|
|
4[0-4]| |
149
|
|
|
|
|
|
|
5[1-589] |
150
|
|
|
|
|
|
|
) |
151
|
|
|
|
|
|
|
)\\d{3} |
152
|
|
|
|
|
|
|
', |
153
|
|
|
|
|
|
|
'pager' => '', |
154
|
|
|
|
|
|
|
'personal_number' => '70[0-2]\\d{5}', |
155
|
|
|
|
|
|
|
'specialrate' => '( |
156
|
|
|
|
|
|
|
(?: |
157
|
|
|
|
|
|
|
40\\d\\d| |
158
|
|
|
|
|
|
|
900 |
159
|
|
|
|
|
|
|
)\\d{4} |
160
|
|
|
|
|
|
|
)', |
161
|
|
|
|
|
|
|
'toll_free' => ' |
162
|
|
|
|
|
|
|
800(?: |
163
|
|
|
|
|
|
|
(?: |
164
|
|
|
|
|
|
|
0\\d\\d| |
165
|
|
|
|
|
|
|
1 |
166
|
|
|
|
|
|
|
)\\d| |
167
|
|
|
|
|
|
|
[2-9] |
168
|
|
|
|
|
|
|
)\\d{3} |
169
|
|
|
|
|
|
|
', |
170
|
|
|
|
|
|
|
'voip' => '' |
171
|
|
|
|
|
|
|
}; |
172
|
|
|
|
|
|
|
my %areanames = (); |
173
|
|
|
|
|
|
|
$areanames{en} = {"37274", "Tartu", |
174
|
|
|
|
|
|
|
"37244", "Pärnu", |
175
|
|
|
|
|
|
|
"37247", "Haapsalu", |
176
|
|
|
|
|
|
|
"3726", "Tallinn\/Harju\ County", |
177
|
|
|
|
|
|
|
"37277", "Jõgeva", |
178
|
|
|
|
|
|
|
"37235", "Narva\/Sillamäe", |
179
|
|
|
|
|
|
|
"37275", "Tartu", |
180
|
|
|
|
|
|
|
"37245", "Kuressaare", |
181
|
|
|
|
|
|
|
"37279", "Põlva", |
182
|
|
|
|
|
|
|
"37232", "Rakvere", |
183
|
|
|
|
|
|
|
"37233", "Kohtla\-Järve", |
184
|
|
|
|
|
|
|
"37243", "Viljandi", |
185
|
|
|
|
|
|
|
"37273", "Tartu", |
186
|
|
|
|
|
|
|
"37248", "Rapla", |
187
|
|
|
|
|
|
|
"37278", "Võru", |
188
|
|
|
|
|
|
|
"37276", "Valga", |
189
|
|
|
|
|
|
|
"37246", "Kärdla", |
190
|
|
|
|
|
|
|
"37238", "Paide",}; |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub new { |
193
|
16
|
|
|
16
|
1
|
37
|
my $class = shift; |
194
|
16
|
|
|
|
|
33
|
my $number = shift; |
195
|
16
|
|
|
|
|
105
|
$number =~ s/(^\+372|\D)//g; |
196
|
16
|
|
|
|
|
110
|
my $self = bless({ country_code => '372', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
197
|
16
|
100
|
|
|
|
82
|
return $self->is_valid() ? $self : undef; |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
1; |