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
|
|
2207
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
482
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
30
|
use strict; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
85
|
|
23
|
2
|
|
|
2
|
|
15
|
use warnings; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
106
|
|
24
|
2
|
|
|
2
|
|
21
|
use utf8; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
26
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174403; |
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
|
|
|
|
|
|
|
[3679]\\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} = {"37232", "Rakvere", |
174
|
|
|
|
|
|
|
"37277", "Jõgeva", |
175
|
|
|
|
|
|
|
"37247", "Haapsalu", |
176
|
|
|
|
|
|
|
"37279", "Põlva", |
177
|
|
|
|
|
|
|
"37248", "Rapla", |
178
|
|
|
|
|
|
|
"37233", "Kohtla\-Järve", |
179
|
|
|
|
|
|
|
"37278", "Võru", |
180
|
|
|
|
|
|
|
"37235", "Narva\/Sillamäe", |
181
|
|
|
|
|
|
|
"37276", "Valga", |
182
|
|
|
|
|
|
|
"37246", "Kärdla", |
183
|
|
|
|
|
|
|
"37238", "Paide", |
184
|
|
|
|
|
|
|
"37243", "Viljandi", |
185
|
|
|
|
|
|
|
"37273", "Tartu", |
186
|
|
|
|
|
|
|
"37275", "Tartu", |
187
|
|
|
|
|
|
|
"37245", "Kuressaare", |
188
|
|
|
|
|
|
|
"37244", "Pärnu", |
189
|
|
|
|
|
|
|
"37274", "Tartu", |
190
|
|
|
|
|
|
|
"3726", "Tallinn\/Harju\ County",}; |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub new { |
193
|
16
|
|
|
16
|
1
|
44
|
my $class = shift; |
194
|
16
|
|
|
|
|
33
|
my $number = shift; |
195
|
16
|
|
|
|
|
107
|
$number =~ s/(^\+372|\D)//g; |
196
|
16
|
|
|
|
|
133
|
my $self = bless({ country_code => '372', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
197
|
16
|
100
|
|
|
|
99
|
return $self->is_valid() ? $self : undef; |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
1; |