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::FI; |
20
|
3
|
|
|
3
|
|
1757
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
347
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
31
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
71
|
|
23
|
3
|
|
|
3
|
|
21
|
use warnings; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
73
|
|
24
|
3
|
|
|
3
|
|
21
|
use utf8; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
17
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174403; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1', |
30
|
|
|
|
|
|
|
'intl_format' => 'NA', |
31
|
|
|
|
|
|
|
'leading_digits' => '75[12]', |
32
|
|
|
|
|
|
|
'national_rule' => '0$1', |
33
|
|
|
|
|
|
|
'pattern' => '(\\d{5})' |
34
|
|
|
|
|
|
|
}, |
35
|
|
|
|
|
|
|
{ |
36
|
|
|
|
|
|
|
'format' => '$1 $2', |
37
|
|
|
|
|
|
|
'leading_digits' => ' |
38
|
|
|
|
|
|
|
[2568][1-8]| |
39
|
|
|
|
|
|
|
3(?: |
40
|
|
|
|
|
|
|
0[1-9]| |
41
|
|
|
|
|
|
|
[1-9] |
42
|
|
|
|
|
|
|
)| |
43
|
|
|
|
|
|
|
9 |
44
|
|
|
|
|
|
|
', |
45
|
|
|
|
|
|
|
'national_rule' => '0$1', |
46
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{4,9})' |
47
|
|
|
|
|
|
|
}, |
48
|
|
|
|
|
|
|
{ |
49
|
|
|
|
|
|
|
'format' => '$1', |
50
|
|
|
|
|
|
|
'intl_format' => 'NA', |
51
|
|
|
|
|
|
|
'leading_digits' => '11', |
52
|
|
|
|
|
|
|
'pattern' => '(\\d{6})' |
53
|
|
|
|
|
|
|
}, |
54
|
|
|
|
|
|
|
{ |
55
|
|
|
|
|
|
|
'format' => '$1 $2', |
56
|
|
|
|
|
|
|
'leading_digits' => ' |
57
|
|
|
|
|
|
|
[12]00| |
58
|
|
|
|
|
|
|
[368]| |
59
|
|
|
|
|
|
|
70[07-9] |
60
|
|
|
|
|
|
|
', |
61
|
|
|
|
|
|
|
'national_rule' => '0$1', |
62
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3,7})' |
63
|
|
|
|
|
|
|
}, |
64
|
|
|
|
|
|
|
{ |
65
|
|
|
|
|
|
|
'format' => '$1 $2', |
66
|
|
|
|
|
|
|
'leading_digits' => ' |
67
|
|
|
|
|
|
|
[1245]| |
68
|
|
|
|
|
|
|
7[135] |
69
|
|
|
|
|
|
|
', |
70
|
|
|
|
|
|
|
'national_rule' => '0$1', |
71
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{4,8})' |
72
|
|
|
|
|
|
|
}, |
73
|
|
|
|
|
|
|
{ |
74
|
|
|
|
|
|
|
'format' => '$1 $2', |
75
|
|
|
|
|
|
|
'leading_digits' => '7', |
76
|
|
|
|
|
|
|
'national_rule' => '0$1', |
77
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{6,10})' |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
]; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
my $validators = { |
82
|
|
|
|
|
|
|
'fixed_line' => ' |
83
|
|
|
|
|
|
|
(?: |
84
|
|
|
|
|
|
|
1[3-79][1-8]| |
85
|
|
|
|
|
|
|
[235689][1-8]\\d |
86
|
|
|
|
|
|
|
)\\d{2,6} |
87
|
|
|
|
|
|
|
', |
88
|
|
|
|
|
|
|
'geographic' => ' |
89
|
|
|
|
|
|
|
(?: |
90
|
|
|
|
|
|
|
1[3-79][1-8]| |
91
|
|
|
|
|
|
|
[235689][1-8]\\d |
92
|
|
|
|
|
|
|
)\\d{2,6} |
93
|
|
|
|
|
|
|
', |
94
|
|
|
|
|
|
|
'mobile' => ' |
95
|
|
|
|
|
|
|
4946\\d{2,6}| |
96
|
|
|
|
|
|
|
(?: |
97
|
|
|
|
|
|
|
4[0-8]| |
98
|
|
|
|
|
|
|
50 |
99
|
|
|
|
|
|
|
)\\d{4,8} |
100
|
|
|
|
|
|
|
', |
101
|
|
|
|
|
|
|
'pager' => '', |
102
|
|
|
|
|
|
|
'personal_number' => '', |
103
|
|
|
|
|
|
|
'specialrate' => '([67]00\\d{5,6})|( |
104
|
|
|
|
|
|
|
20\\d{4,8}| |
105
|
|
|
|
|
|
|
60[12]\\d{5,6}| |
106
|
|
|
|
|
|
|
7(?: |
107
|
|
|
|
|
|
|
099\\d{4,5}| |
108
|
|
|
|
|
|
|
5[03-9]\\d{3,7} |
109
|
|
|
|
|
|
|
)| |
110
|
|
|
|
|
|
|
20[2-59]\\d\\d| |
111
|
|
|
|
|
|
|
(?: |
112
|
|
|
|
|
|
|
606| |
113
|
|
|
|
|
|
|
7(?: |
114
|
|
|
|
|
|
|
0[78]| |
115
|
|
|
|
|
|
|
1| |
116
|
|
|
|
|
|
|
3\\d |
117
|
|
|
|
|
|
|
) |
118
|
|
|
|
|
|
|
)\\d{7}| |
119
|
|
|
|
|
|
|
(?: |
120
|
|
|
|
|
|
|
10| |
121
|
|
|
|
|
|
|
29| |
122
|
|
|
|
|
|
|
3[09]| |
123
|
|
|
|
|
|
|
70[1-5]\\d |
124
|
|
|
|
|
|
|
)\\d{4,8} |
125
|
|
|
|
|
|
|
)', |
126
|
|
|
|
|
|
|
'toll_free' => '800\\d{4,6}', |
127
|
|
|
|
|
|
|
'voip' => '' |
128
|
|
|
|
|
|
|
}; |
129
|
|
|
|
|
|
|
my %areanames = (); |
130
|
|
|
|
|
|
|
$areanames{sv} = {"35814", "Mellersta\ Finland", |
131
|
|
|
|
|
|
|
"35822", "Åbo\/Björneborg", |
132
|
|
|
|
|
|
|
"35861", "Vasa", |
133
|
|
|
|
|
|
|
"35882", "Uleåborg", |
134
|
|
|
|
|
|
|
"35855", "Kymmene", |
135
|
|
|
|
|
|
|
"35853", "Kymmene", |
136
|
|
|
|
|
|
|
"35856", "Kymmene", |
137
|
|
|
|
|
|
|
"35831", "Tavastland", |
138
|
|
|
|
|
|
|
"35887", "Uleåborg", |
139
|
|
|
|
|
|
|
"35888", "Uleåborg", |
140
|
|
|
|
|
|
|
"35824", "Åbo\/Björneborg", |
141
|
|
|
|
|
|
|
"35833", "Tavastland", |
142
|
|
|
|
|
|
|
"35835", "Tavastland", |
143
|
|
|
|
|
|
|
"35851", "Kymmene", |
144
|
|
|
|
|
|
|
"35827", "Åbo\/Björneborg", |
145
|
|
|
|
|
|
|
"35836", "Tavastland", |
146
|
|
|
|
|
|
|
"35884", "Uleåborg", |
147
|
|
|
|
|
|
|
"35863", "Vasa", |
148
|
|
|
|
|
|
|
"35865", "Vasa", |
149
|
|
|
|
|
|
|
"35819", "Nyland", |
150
|
|
|
|
|
|
|
"35828", "Åbo\/Björneborg", |
151
|
|
|
|
|
|
|
"35866", "Vasa", |
152
|
|
|
|
|
|
|
"35815", "St\ Michel", |
153
|
|
|
|
|
|
|
"35858", "Kymmene", |
154
|
|
|
|
|
|
|
"35813", "Norra\ Karelen", |
155
|
|
|
|
|
|
|
"35816", "Lappland", |
156
|
|
|
|
|
|
|
"35857", "Kymmene", |
157
|
|
|
|
|
|
|
"35821", "Åbo\/Björneborg", |
158
|
|
|
|
|
|
|
"35862", "Vasa", |
159
|
|
|
|
|
|
|
"35854", "Kymmene", |
160
|
|
|
|
|
|
|
"35832", "Tavastland", |
161
|
|
|
|
|
|
|
"3589", "Helsingfors", |
162
|
|
|
|
|
|
|
"35881", "Uleåborg", |
163
|
|
|
|
|
|
|
"35868", "Vasa", |
164
|
|
|
|
|
|
|
"35826", "Åbo\/Björneborg", |
165
|
|
|
|
|
|
|
"35837", "Tavastland", |
166
|
|
|
|
|
|
|
"35825", "Åbo\/Björneborg", |
167
|
|
|
|
|
|
|
"35823", "Åbo\/Björneborg", |
168
|
|
|
|
|
|
|
"35838", "Tavastland", |
169
|
|
|
|
|
|
|
"35867", "Vasa", |
170
|
|
|
|
|
|
|
"35864", "Vasa", |
171
|
|
|
|
|
|
|
"35883", "Uleåborg", |
172
|
|
|
|
|
|
|
"35852", "Kymmene", |
173
|
|
|
|
|
|
|
"35885", "Uleåborg", |
174
|
|
|
|
|
|
|
"35886", "Uleåborg", |
175
|
|
|
|
|
|
|
"35834", "Tavastland",}; |
176
|
|
|
|
|
|
|
$areanames{en} = {"35834", "Häme", |
177
|
|
|
|
|
|
|
"35886", "Oulu", |
178
|
|
|
|
|
|
|
"35883", "Oulu", |
179
|
|
|
|
|
|
|
"35864", "Vaasa", |
180
|
|
|
|
|
|
|
"35885", "Oulu", |
181
|
|
|
|
|
|
|
"35852", "Kymi", |
182
|
|
|
|
|
|
|
"35838", "Häme", |
183
|
|
|
|
|
|
|
"35867", "Vaasa", |
184
|
|
|
|
|
|
|
"35825", "Turku\/Pori", |
185
|
|
|
|
|
|
|
"35823", "Turku\/Pori", |
186
|
|
|
|
|
|
|
"35826", "Turku\/Pori", |
187
|
|
|
|
|
|
|
"35868", "Vaasa", |
188
|
|
|
|
|
|
|
"35837", "Häme", |
189
|
|
|
|
|
|
|
"3589", "Helsinki", |
190
|
|
|
|
|
|
|
"35881", "Oulu", |
191
|
|
|
|
|
|
|
"35832", "Häme", |
192
|
|
|
|
|
|
|
"35862", "Vaasa", |
193
|
|
|
|
|
|
|
"35854", "Kymi", |
194
|
|
|
|
|
|
|
"35821", "Turku\/Pori", |
195
|
|
|
|
|
|
|
"35857", "Kymi", |
196
|
|
|
|
|
|
|
"35816", "Lapland", |
197
|
|
|
|
|
|
|
"35815", "Mikkeli", |
198
|
|
|
|
|
|
|
"35813", "North\ Karelia", |
199
|
|
|
|
|
|
|
"35858", "Kymi", |
200
|
|
|
|
|
|
|
"35819", "Uusimaa", |
201
|
|
|
|
|
|
|
"35828", "Turku\/Pori", |
202
|
|
|
|
|
|
|
"35866", "Vaasa", |
203
|
|
|
|
|
|
|
"35884", "Oulu", |
204
|
|
|
|
|
|
|
"35863", "Vaasa", |
205
|
|
|
|
|
|
|
"35865", "Vaasa", |
206
|
|
|
|
|
|
|
"35827", "Turku\/Pori", |
207
|
|
|
|
|
|
|
"35851", "Kymi", |
208
|
|
|
|
|
|
|
"35836", "Häme", |
209
|
|
|
|
|
|
|
"35833", "Häme", |
210
|
|
|
|
|
|
|
"35835", "Häme", |
211
|
|
|
|
|
|
|
"35824", "Turku\/Pori", |
212
|
|
|
|
|
|
|
"35888", "Oulu", |
213
|
|
|
|
|
|
|
"35887", "Oulu", |
214
|
|
|
|
|
|
|
"35856", "Kymi", |
215
|
|
|
|
|
|
|
"35831", "Häme", |
216
|
|
|
|
|
|
|
"35855", "Kymi", |
217
|
|
|
|
|
|
|
"35882", "Oulu", |
218
|
|
|
|
|
|
|
"35853", "Kymi", |
219
|
|
|
|
|
|
|
"35861", "Vaasa", |
220
|
|
|
|
|
|
|
"35817", "Kuopio", |
221
|
|
|
|
|
|
|
"35822", "Turku\/Pori", |
222
|
|
|
|
|
|
|
"35814", "Central\ Finland",}; |
223
|
|
|
|
|
|
|
$areanames{fi} = {"35816", "Lappi", |
224
|
|
|
|
|
|
|
"35813", "Pohjois\-Karjala", |
225
|
|
|
|
|
|
|
"35814", "Keski\-Suomi",}; |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
sub new { |
228
|
52
|
|
|
52
|
1
|
108
|
my $class = shift; |
229
|
52
|
|
|
|
|
81
|
my $number = shift; |
230
|
52
|
|
|
|
|
320
|
$number =~ s/(^\+358|\D)//g; |
231
|
52
|
|
|
|
|
329
|
my $self = bless({ country_code => '358', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
232
|
52
|
100
|
|
|
|
249
|
return $self if ($self->is_valid()); |
233
|
6
|
|
|
|
|
22
|
$number =~ s/^(?:0)//; |
234
|
6
|
|
|
|
|
64
|
$self = bless({ country_code => '358', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
235
|
6
|
50
|
|
|
|
23
|
return $self->is_valid() ? $self : undef; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
1; |