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
|
|
1630
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
333
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
28
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
68
|
|
23
|
3
|
|
|
3
|
|
20
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
71
|
|
24
|
3
|
|
|
3
|
|
19
|
use utf8; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
22
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174401; |
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{en} = {"35838", "Häme", |
69
|
|
|
|
|
|
|
"35867", "Vaasa", |
70
|
|
|
|
|
|
|
"35825", "Turku\/Pori", |
71
|
|
|
|
|
|
|
"35823", "Turku\/Pori", |
72
|
|
|
|
|
|
|
"35826", "Turku\/Pori", |
73
|
|
|
|
|
|
|
"35868", "Vaasa", |
74
|
|
|
|
|
|
|
"35837", "Häme", |
75
|
|
|
|
|
|
|
"35834", "Häme", |
76
|
|
|
|
|
|
|
"35886", "Oulu", |
77
|
|
|
|
|
|
|
"35883", "Oulu", |
78
|
|
|
|
|
|
|
"35864", "Vaasa", |
79
|
|
|
|
|
|
|
"35885", "Oulu", |
80
|
|
|
|
|
|
|
"35852", "Kymi", |
81
|
|
|
|
|
|
|
"35857", "Kymi", |
82
|
|
|
|
|
|
|
"35821", "Turku\/Pori", |
83
|
|
|
|
|
|
|
"35816", "Lapland", |
84
|
|
|
|
|
|
|
"35815", "Mikkeli", |
85
|
|
|
|
|
|
|
"35858", "Kymi", |
86
|
|
|
|
|
|
|
"35813", "North\ Karelia", |
87
|
|
|
|
|
|
|
"3589", "Helsinki", |
88
|
|
|
|
|
|
|
"35881", "Oulu", |
89
|
|
|
|
|
|
|
"35832", "Häme", |
90
|
|
|
|
|
|
|
"35862", "Vaasa", |
91
|
|
|
|
|
|
|
"35854", "Kymi", |
92
|
|
|
|
|
|
|
"35824", "Turku\/Pori", |
93
|
|
|
|
|
|
|
"35888", "Oulu", |
94
|
|
|
|
|
|
|
"35887", "Oulu", |
95
|
|
|
|
|
|
|
"35819", "Uusimaa", |
96
|
|
|
|
|
|
|
"35866", "Vaasa", |
97
|
|
|
|
|
|
|
"35828", "Turku\/Pori", |
98
|
|
|
|
|
|
|
"35884", "Oulu", |
99
|
|
|
|
|
|
|
"35863", "Vaasa", |
100
|
|
|
|
|
|
|
"35865", "Vaasa", |
101
|
|
|
|
|
|
|
"35827", "Turku\/Pori", |
102
|
|
|
|
|
|
|
"35851", "Kymi", |
103
|
|
|
|
|
|
|
"35836", "Häme", |
104
|
|
|
|
|
|
|
"35833", "Häme", |
105
|
|
|
|
|
|
|
"35835", "Häme", |
106
|
|
|
|
|
|
|
"35822", "Turku\/Pori", |
107
|
|
|
|
|
|
|
"35814", "Central\ Finland", |
108
|
|
|
|
|
|
|
"35856", "Kymi", |
109
|
|
|
|
|
|
|
"35831", "Häme", |
110
|
|
|
|
|
|
|
"35855", "Kymi", |
111
|
|
|
|
|
|
|
"35882", "Oulu", |
112
|
|
|
|
|
|
|
"35853", "Kymi", |
113
|
|
|
|
|
|
|
"35861", "Vaasa", |
114
|
|
|
|
|
|
|
"35817", "Kuopio",}; |
115
|
|
|
|
|
|
|
$areanames{sv} = {"35887", "Uleåborg", |
116
|
|
|
|
|
|
|
"35888", "Uleåborg", |
117
|
|
|
|
|
|
|
"35824", "Åbo\/Björneborg", |
118
|
|
|
|
|
|
|
"35835", "Tavastland", |
119
|
|
|
|
|
|
|
"35833", "Tavastland", |
120
|
|
|
|
|
|
|
"35836", "Tavastland", |
121
|
|
|
|
|
|
|
"35851", "Kymmene", |
122
|
|
|
|
|
|
|
"35827", "Åbo\/Björneborg", |
123
|
|
|
|
|
|
|
"35865", "Vasa", |
124
|
|
|
|
|
|
|
"35884", "Uleåborg", |
125
|
|
|
|
|
|
|
"35863", "Vasa", |
126
|
|
|
|
|
|
|
"35866", "Vasa", |
127
|
|
|
|
|
|
|
"35828", "Åbo\/Björneborg", |
128
|
|
|
|
|
|
|
"35819", "Nyland", |
129
|
|
|
|
|
|
|
"35814", "Mellersta\ Finland", |
130
|
|
|
|
|
|
|
"35822", "Åbo\/Björneborg", |
131
|
|
|
|
|
|
|
"35861", "Vasa", |
132
|
|
|
|
|
|
|
"35853", "Kymmene", |
133
|
|
|
|
|
|
|
"35882", "Uleåborg", |
134
|
|
|
|
|
|
|
"35855", "Kymmene", |
135
|
|
|
|
|
|
|
"35831", "Tavastland", |
136
|
|
|
|
|
|
|
"35856", "Kymmene", |
137
|
|
|
|
|
|
|
"35837", "Tavastland", |
138
|
|
|
|
|
|
|
"35826", "Åbo\/Björneborg", |
139
|
|
|
|
|
|
|
"35868", "Vasa", |
140
|
|
|
|
|
|
|
"35823", "Åbo\/Björneborg", |
141
|
|
|
|
|
|
|
"35825", "Åbo\/Björneborg", |
142
|
|
|
|
|
|
|
"35867", "Vasa", |
143
|
|
|
|
|
|
|
"35838", "Tavastland", |
144
|
|
|
|
|
|
|
"35852", "Kymmene", |
145
|
|
|
|
|
|
|
"35885", "Uleåborg", |
146
|
|
|
|
|
|
|
"35883", "Uleåborg", |
147
|
|
|
|
|
|
|
"35864", "Vasa", |
148
|
|
|
|
|
|
|
"35886", "Uleåborg", |
149
|
|
|
|
|
|
|
"35834", "Tavastland", |
150
|
|
|
|
|
|
|
"35813", "Norra\ Karelen", |
151
|
|
|
|
|
|
|
"35858", "Kymmene", |
152
|
|
|
|
|
|
|
"35815", "St\ Michel", |
153
|
|
|
|
|
|
|
"35816", "Lappland", |
154
|
|
|
|
|
|
|
"35821", "Åbo\/Björneborg", |
155
|
|
|
|
|
|
|
"35857", "Kymmene", |
156
|
|
|
|
|
|
|
"35854", "Kymmene", |
157
|
|
|
|
|
|
|
"35862", "Vasa", |
158
|
|
|
|
|
|
|
"35832", "Tavastland", |
159
|
|
|
|
|
|
|
"35881", "Uleåborg", |
160
|
|
|
|
|
|
|
"3589", "Helsingfors",}; |
161
|
|
|
|
|
|
|
$areanames{fi} = {"35814", "Keski\-Suomi", |
162
|
|
|
|
|
|
|
"35813", "Pohjois\-Karjala", |
163
|
|
|
|
|
|
|
"35816", "Lappi",}; |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
sub new { |
166
|
16
|
|
|
16
|
1
|
30
|
my $class = shift; |
167
|
16
|
|
|
|
|
30
|
my $number = shift; |
168
|
16
|
|
|
|
|
106
|
$number =~ s/(^\+358|\D)//g; |
169
|
16
|
|
|
|
|
87
|
my $self = bless({ country_code => '358', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
170
|
16
|
100
|
|
|
|
74
|
return $self if ($self->is_valid()); |
171
|
2
|
|
|
|
|
8
|
$number =~ s/^(?:0)//; |
172
|
2
|
|
|
|
|
25
|
$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; |