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::AX; |
20
|
3
|
|
|
3
|
|
1586
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
334
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
20
|
use strict; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
69
|
|
23
|
3
|
|
|
3
|
|
29
|
use warnings; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
74
|
|
24
|
3
|
|
|
3
|
|
17
|
use utf8; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
18
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131441; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = []; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
my $validators = { |
30
|
|
|
|
|
|
|
'fixed_line' => '18[1-8]\\d{3,6}', |
31
|
|
|
|
|
|
|
'geographic' => '18[1-8]\\d{3,6}', |
32
|
|
|
|
|
|
|
'mobile' => ' |
33
|
|
|
|
|
|
|
4946\\d{2,6}| |
34
|
|
|
|
|
|
|
(?: |
35
|
|
|
|
|
|
|
4[0-8]| |
36
|
|
|
|
|
|
|
50 |
37
|
|
|
|
|
|
|
)\\d{4,8} |
38
|
|
|
|
|
|
|
', |
39
|
|
|
|
|
|
|
'pager' => '', |
40
|
|
|
|
|
|
|
'personal_number' => '', |
41
|
|
|
|
|
|
|
'specialrate' => '([67]00\\d{5,6})|( |
42
|
|
|
|
|
|
|
20\\d{4,8}| |
43
|
|
|
|
|
|
|
60[12]\\d{5,6}| |
44
|
|
|
|
|
|
|
7(?: |
45
|
|
|
|
|
|
|
099\\d{4,5}| |
46
|
|
|
|
|
|
|
5[03-9]\\d{3,7} |
47
|
|
|
|
|
|
|
)| |
48
|
|
|
|
|
|
|
20[2-59]\\d\\d| |
49
|
|
|
|
|
|
|
(?: |
50
|
|
|
|
|
|
|
606| |
51
|
|
|
|
|
|
|
7(?: |
52
|
|
|
|
|
|
|
0[78]| |
53
|
|
|
|
|
|
|
1| |
54
|
|
|
|
|
|
|
3\\d |
55
|
|
|
|
|
|
|
) |
56
|
|
|
|
|
|
|
)\\d{7}| |
57
|
|
|
|
|
|
|
(?: |
58
|
|
|
|
|
|
|
10| |
59
|
|
|
|
|
|
|
29| |
60
|
|
|
|
|
|
|
3[09]| |
61
|
|
|
|
|
|
|
70[1-5]\\d |
62
|
|
|
|
|
|
|
)\\d{4,8} |
63
|
|
|
|
|
|
|
)', |
64
|
|
|
|
|
|
|
'toll_free' => '800\\d{4,6}', |
65
|
|
|
|
|
|
|
'voip' => '' |
66
|
|
|
|
|
|
|
}; |
67
|
|
|
|
|
|
|
my %areanames = (); |
68
|
|
|
|
|
|
|
$areanames{fi} = {"35814", "Keski\-Suomi", |
69
|
|
|
|
|
|
|
"35813", "Pohjois\-Karjala", |
70
|
|
|
|
|
|
|
"35816", "Lappi",}; |
71
|
|
|
|
|
|
|
$areanames{sv} = {"35823", "Åbo\/Björneborg", |
72
|
|
|
|
|
|
|
"35856", "Kymmene", |
73
|
|
|
|
|
|
|
"35814", "Mellersta\ Finland", |
74
|
|
|
|
|
|
|
"35851", "Kymmene", |
75
|
|
|
|
|
|
|
"35828", "Åbo\/Björneborg", |
76
|
|
|
|
|
|
|
"35887", "Uleåborg", |
77
|
|
|
|
|
|
|
"35852", "Kymmene", |
78
|
|
|
|
|
|
|
"35865", "Vasa", |
79
|
|
|
|
|
|
|
"35882", "Uleåborg", |
80
|
|
|
|
|
|
|
"35857", "Kymmene", |
81
|
|
|
|
|
|
|
"35824", "Åbo\/Björneborg", |
82
|
|
|
|
|
|
|
"35881", "Uleåborg", |
83
|
|
|
|
|
|
|
"35813", "Norra\ Karelen", |
84
|
|
|
|
|
|
|
"35886", "Uleåborg", |
85
|
|
|
|
|
|
|
"35835", "Tavastland", |
86
|
|
|
|
|
|
|
"35832", "Tavastland", |
87
|
|
|
|
|
|
|
"35831", "Tavastland", |
88
|
|
|
|
|
|
|
"35867", "Vasa", |
89
|
|
|
|
|
|
|
"35885", "Uleåborg", |
90
|
|
|
|
|
|
|
"35836", "Tavastland", |
91
|
|
|
|
|
|
|
"35861", "Vasa", |
92
|
|
|
|
|
|
|
"35819", "Nyland", |
93
|
|
|
|
|
|
|
"35855", "Kymmene", |
94
|
|
|
|
|
|
|
"35862", "Vasa", |
95
|
|
|
|
|
|
|
"35866", "Vasa", |
96
|
|
|
|
|
|
|
"35837", "Tavastland", |
97
|
|
|
|
|
|
|
"35884", "Uleåborg", |
98
|
|
|
|
|
|
|
"35822", "Åbo\/Björneborg", |
99
|
|
|
|
|
|
|
"35858", "Kymmene", |
100
|
|
|
|
|
|
|
"35821", "Åbo\/Björneborg", |
101
|
|
|
|
|
|
|
"35826", "Åbo\/Björneborg", |
102
|
|
|
|
|
|
|
"35853", "Kymmene", |
103
|
|
|
|
|
|
|
"35883", "Uleåborg", |
104
|
|
|
|
|
|
|
"35888", "Uleåborg", |
105
|
|
|
|
|
|
|
"35827", "Åbo\/Björneborg", |
106
|
|
|
|
|
|
|
"35854", "Kymmene", |
107
|
|
|
|
|
|
|
"35816", "Lappland", |
108
|
|
|
|
|
|
|
"35833", "Tavastland", |
109
|
|
|
|
|
|
|
"35864", "Vasa", |
110
|
|
|
|
|
|
|
"35838", "Tavastland", |
111
|
|
|
|
|
|
|
"35815", "St\ Michel", |
112
|
|
|
|
|
|
|
"35834", "Tavastland", |
113
|
|
|
|
|
|
|
"35863", "Vasa", |
114
|
|
|
|
|
|
|
"3589", "Helsingfors", |
115
|
|
|
|
|
|
|
"35825", "Åbo\/Björneborg", |
116
|
|
|
|
|
|
|
"35868", "Vasa",}; |
117
|
|
|
|
|
|
|
$areanames{en} = {"35827", "Turku\/Pori", |
118
|
|
|
|
|
|
|
"35854", "Kymi", |
119
|
|
|
|
|
|
|
"35816", "Lapland", |
120
|
|
|
|
|
|
|
"35888", "Oulu", |
121
|
|
|
|
|
|
|
"35883", "Oulu", |
122
|
|
|
|
|
|
|
"35853", "Kymi", |
123
|
|
|
|
|
|
|
"35817", "Kuopio", |
124
|
|
|
|
|
|
|
"35826", "Turku\/Pori", |
125
|
|
|
|
|
|
|
"35858", "Kymi", |
126
|
|
|
|
|
|
|
"35821", "Turku\/Pori", |
127
|
|
|
|
|
|
|
"35884", "Oulu", |
128
|
|
|
|
|
|
|
"35822", "Turku\/Pori", |
129
|
|
|
|
|
|
|
"35868", "Vaasa", |
130
|
|
|
|
|
|
|
"3589", "Helsinki", |
131
|
|
|
|
|
|
|
"35825", "Turku\/Pori", |
132
|
|
|
|
|
|
|
"35863", "Vaasa", |
133
|
|
|
|
|
|
|
"35834", "Häme", |
134
|
|
|
|
|
|
|
"35815", "Mikkeli", |
135
|
|
|
|
|
|
|
"35838", "Häme", |
136
|
|
|
|
|
|
|
"35864", "Vaasa", |
137
|
|
|
|
|
|
|
"35833", "Häme", |
138
|
|
|
|
|
|
|
"35835", "Häme", |
139
|
|
|
|
|
|
|
"35886", "Oulu", |
140
|
|
|
|
|
|
|
"35813", "North\ Karelia", |
141
|
|
|
|
|
|
|
"35881", "Oulu", |
142
|
|
|
|
|
|
|
"35882", "Oulu", |
143
|
|
|
|
|
|
|
"35857", "Kymi", |
144
|
|
|
|
|
|
|
"35824", "Turku\/Pori", |
145
|
|
|
|
|
|
|
"35887", "Oulu", |
146
|
|
|
|
|
|
|
"35852", "Kymi", |
147
|
|
|
|
|
|
|
"35865", "Vaasa", |
148
|
|
|
|
|
|
|
"35851", "Kymi", |
149
|
|
|
|
|
|
|
"35828", "Turku\/Pori", |
150
|
|
|
|
|
|
|
"35856", "Kymi", |
151
|
|
|
|
|
|
|
"35814", "Central\ Finland", |
152
|
|
|
|
|
|
|
"35823", "Turku\/Pori", |
153
|
|
|
|
|
|
|
"35837", "Häme", |
154
|
|
|
|
|
|
|
"35866", "Vaasa", |
155
|
|
|
|
|
|
|
"35855", "Kymi", |
156
|
|
|
|
|
|
|
"35862", "Vaasa", |
157
|
|
|
|
|
|
|
"35819", "Uusimaa", |
158
|
|
|
|
|
|
|
"35861", "Vaasa", |
159
|
|
|
|
|
|
|
"35836", "Häme", |
160
|
|
|
|
|
|
|
"35867", "Vaasa", |
161
|
|
|
|
|
|
|
"35885", "Oulu", |
162
|
|
|
|
|
|
|
"35831", "Häme", |
163
|
|
|
|
|
|
|
"35832", "Häme",}; |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
sub new { |
166
|
16
|
|
|
16
|
1
|
38
|
my $class = shift; |
167
|
16
|
|
|
|
|
28
|
my $number = shift; |
168
|
16
|
|
|
|
|
96
|
$number =~ s/(^\+358|\D)//g; |
169
|
16
|
|
|
|
|
90
|
my $self = bless({ country_code => '358', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
170
|
16
|
100
|
|
|
|
69
|
return $self if ($self->is_valid()); |
171
|
2
|
|
|
|
|
5
|
$number =~ s/^(?:0)//; |
172
|
2
|
|
|
|
|
24
|
$self = bless({ country_code => '358', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
173
|
2
|
50
|
|
|
|
8
|
return $self->is_valid() ? $self : undef; |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
1; |