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