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
|
|
1698
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
343
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
26
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
73
|
|
23
|
3
|
|
|
3
|
|
30
|
use warnings; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
88
|
|
24
|
3
|
|
|
3
|
|
22
|
use utf8; |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
16
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131447; |
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{en} = {"35866", "Vaasa", |
131
|
|
|
|
|
|
|
"35837", "Häme", |
132
|
|
|
|
|
|
|
"35861", "Vaasa", |
133
|
|
|
|
|
|
|
"35819", "Uusimaa", |
134
|
|
|
|
|
|
|
"35855", "Kymi", |
135
|
|
|
|
|
|
|
"35862", "Vaasa", |
136
|
|
|
|
|
|
|
"35867", "Vaasa", |
137
|
|
|
|
|
|
|
"35885", "Oulu", |
138
|
|
|
|
|
|
|
"35836", "Häme", |
139
|
|
|
|
|
|
|
"35832", "Häme", |
140
|
|
|
|
|
|
|
"35831", "Häme", |
141
|
|
|
|
|
|
|
"35886", "Oulu", |
142
|
|
|
|
|
|
|
"35835", "Häme", |
143
|
|
|
|
|
|
|
"35824", "Turku\/Pori", |
144
|
|
|
|
|
|
|
"35857", "Kymi", |
145
|
|
|
|
|
|
|
"35882", "Oulu", |
146
|
|
|
|
|
|
|
"35881", "Oulu", |
147
|
|
|
|
|
|
|
"35813", "North\ Karelia", |
148
|
|
|
|
|
|
|
"35851", "Kymi", |
149
|
|
|
|
|
|
|
"35828", "Turku\/Pori", |
150
|
|
|
|
|
|
|
"35887", "Oulu", |
151
|
|
|
|
|
|
|
"35852", "Kymi", |
152
|
|
|
|
|
|
|
"35865", "Vaasa", |
153
|
|
|
|
|
|
|
"35823", "Turku\/Pori", |
154
|
|
|
|
|
|
|
"35856", "Kymi", |
155
|
|
|
|
|
|
|
"35814", "Central\ Finland", |
156
|
|
|
|
|
|
|
"3589", "Helsinki", |
157
|
|
|
|
|
|
|
"35825", "Turku\/Pori", |
158
|
|
|
|
|
|
|
"35868", "Vaasa", |
159
|
|
|
|
|
|
|
"35834", "Häme", |
160
|
|
|
|
|
|
|
"35863", "Vaasa", |
161
|
|
|
|
|
|
|
"35838", "Häme", |
162
|
|
|
|
|
|
|
"35815", "Mikkeli", |
163
|
|
|
|
|
|
|
"35833", "Häme", |
164
|
|
|
|
|
|
|
"35864", "Vaasa", |
165
|
|
|
|
|
|
|
"35888", "Oulu", |
166
|
|
|
|
|
|
|
"35827", "Turku\/Pori", |
167
|
|
|
|
|
|
|
"35854", "Kymi", |
168
|
|
|
|
|
|
|
"35816", "Lapland", |
169
|
|
|
|
|
|
|
"35883", "Oulu", |
170
|
|
|
|
|
|
|
"35817", "Kuopio", |
171
|
|
|
|
|
|
|
"35826", "Turku\/Pori", |
172
|
|
|
|
|
|
|
"35853", "Kymi", |
173
|
|
|
|
|
|
|
"35884", "Oulu", |
174
|
|
|
|
|
|
|
"35822", "Turku\/Pori", |
175
|
|
|
|
|
|
|
"35821", "Turku\/Pori", |
176
|
|
|
|
|
|
|
"35858", "Kymi",}; |
177
|
|
|
|
|
|
|
$areanames{sv} = {"35815", "St\ Michel", |
178
|
|
|
|
|
|
|
"35838", "Tavastland", |
179
|
|
|
|
|
|
|
"35864", "Vasa", |
180
|
|
|
|
|
|
|
"35833", "Tavastland", |
181
|
|
|
|
|
|
|
"35868", "Vasa", |
182
|
|
|
|
|
|
|
"3589", "Helsingfors", |
183
|
|
|
|
|
|
|
"35825", "Åbo\/Björneborg", |
184
|
|
|
|
|
|
|
"35863", "Vasa", |
185
|
|
|
|
|
|
|
"35834", "Tavastland", |
186
|
|
|
|
|
|
|
"35853", "Kymmene", |
187
|
|
|
|
|
|
|
"35826", "Åbo\/Björneborg", |
188
|
|
|
|
|
|
|
"35821", "Åbo\/Björneborg", |
189
|
|
|
|
|
|
|
"35858", "Kymmene", |
190
|
|
|
|
|
|
|
"35822", "Åbo\/Björneborg", |
191
|
|
|
|
|
|
|
"35884", "Uleåborg", |
192
|
|
|
|
|
|
|
"35854", "Kymmene", |
193
|
|
|
|
|
|
|
"35827", "Åbo\/Björneborg", |
194
|
|
|
|
|
|
|
"35816", "Lappland", |
195
|
|
|
|
|
|
|
"35888", "Uleåborg", |
196
|
|
|
|
|
|
|
"35883", "Uleåborg", |
197
|
|
|
|
|
|
|
"35836", "Tavastland", |
198
|
|
|
|
|
|
|
"35867", "Vasa", |
199
|
|
|
|
|
|
|
"35885", "Uleåborg", |
200
|
|
|
|
|
|
|
"35831", "Tavastland", |
201
|
|
|
|
|
|
|
"35832", "Tavastland", |
202
|
|
|
|
|
|
|
"35837", "Tavastland", |
203
|
|
|
|
|
|
|
"35866", "Vasa", |
204
|
|
|
|
|
|
|
"35855", "Kymmene", |
205
|
|
|
|
|
|
|
"35862", "Vasa", |
206
|
|
|
|
|
|
|
"35819", "Nyland", |
207
|
|
|
|
|
|
|
"35861", "Vasa", |
208
|
|
|
|
|
|
|
"35887", "Uleåborg", |
209
|
|
|
|
|
|
|
"35852", "Kymmene", |
210
|
|
|
|
|
|
|
"35865", "Vasa", |
211
|
|
|
|
|
|
|
"35851", "Kymmene", |
212
|
|
|
|
|
|
|
"35828", "Åbo\/Björneborg", |
213
|
|
|
|
|
|
|
"35856", "Kymmene", |
214
|
|
|
|
|
|
|
"35814", "Mellersta\ Finland", |
215
|
|
|
|
|
|
|
"35823", "Åbo\/Björneborg", |
216
|
|
|
|
|
|
|
"35835", "Tavastland", |
217
|
|
|
|
|
|
|
"35886", "Uleåborg", |
218
|
|
|
|
|
|
|
"35813", "Norra\ Karelen", |
219
|
|
|
|
|
|
|
"35881", "Uleåborg", |
220
|
|
|
|
|
|
|
"35857", "Kymmene", |
221
|
|
|
|
|
|
|
"35824", "Åbo\/Björneborg", |
222
|
|
|
|
|
|
|
"35882", "Uleåborg",}; |
223
|
|
|
|
|
|
|
$areanames{fi} = {"35813", "Pohjois\-Karjala", |
224
|
|
|
|
|
|
|
"35814", "Keski\-Suomi", |
225
|
|
|
|
|
|
|
"35816", "Lappi",}; |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
sub new { |
228
|
52
|
|
|
52
|
1
|
109
|
my $class = shift; |
229
|
52
|
|
|
|
|
93
|
my $number = shift; |
230
|
52
|
|
|
|
|
310
|
$number =~ s/(^\+358|\D)//g; |
231
|
52
|
|
|
|
|
290
|
my $self = bless({ country_code => '358', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
232
|
52
|
100
|
|
|
|
231
|
return $self if ($self->is_valid()); |
233
|
6
|
|
|
|
|
18
|
$number =~ s/^(?:0)//; |
234
|
6
|
|
|
|
|
61
|
$self = bless({ country_code => '358', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
235
|
6
|
50
|
|
|
|
24
|
return $self->is_valid() ? $self : undef; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
1; |