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::PL; |
20
|
2
|
|
|
2
|
|
1421
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
261
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
21
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
56
|
|
23
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
67
|
|
24
|
2
|
|
|
2
|
|
18
|
use utf8; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
16
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1', |
30
|
|
|
|
|
|
|
'leading_digits' => '19', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{5})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1 $2', |
35
|
|
|
|
|
|
|
'leading_digits' => ' |
36
|
|
|
|
|
|
|
11| |
37
|
|
|
|
|
|
|
20| |
38
|
|
|
|
|
|
|
64 |
39
|
|
|
|
|
|
|
', |
40
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})' |
41
|
|
|
|
|
|
|
}, |
42
|
|
|
|
|
|
|
{ |
43
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
44
|
|
|
|
|
|
|
'leading_digits' => ' |
45
|
|
|
|
|
|
|
(?: |
46
|
|
|
|
|
|
|
1[2-8]| |
47
|
|
|
|
|
|
|
2[2-69]| |
48
|
|
|
|
|
|
|
3[2-4]| |
49
|
|
|
|
|
|
|
4[1-468]| |
50
|
|
|
|
|
|
|
5[24-689]| |
51
|
|
|
|
|
|
|
6[1-3578]| |
52
|
|
|
|
|
|
|
7[14-7]| |
53
|
|
|
|
|
|
|
8[1-79]| |
54
|
|
|
|
|
|
|
9[145] |
55
|
|
|
|
|
|
|
)19 |
56
|
|
|
|
|
|
|
', |
57
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{2})(\\d{3})' |
58
|
|
|
|
|
|
|
}, |
59
|
|
|
|
|
|
|
{ |
60
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
61
|
|
|
|
|
|
|
'leading_digits' => '64', |
62
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{2})(\\d{2,3})' |
63
|
|
|
|
|
|
|
}, |
64
|
|
|
|
|
|
|
{ |
65
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
66
|
|
|
|
|
|
|
'leading_digits' => ' |
67
|
|
|
|
|
|
|
21| |
68
|
|
|
|
|
|
|
39| |
69
|
|
|
|
|
|
|
45| |
70
|
|
|
|
|
|
|
5[0137]| |
71
|
|
|
|
|
|
|
6[0469]| |
72
|
|
|
|
|
|
|
7[02389]| |
73
|
|
|
|
|
|
|
8(?: |
74
|
|
|
|
|
|
|
0[14]| |
75
|
|
|
|
|
|
|
8 |
76
|
|
|
|
|
|
|
) |
77
|
|
|
|
|
|
|
', |
78
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{3})' |
79
|
|
|
|
|
|
|
}, |
80
|
|
|
|
|
|
|
{ |
81
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
82
|
|
|
|
|
|
|
'leading_digits' => ' |
83
|
|
|
|
|
|
|
1[2-8]| |
84
|
|
|
|
|
|
|
[2-7]| |
85
|
|
|
|
|
|
|
8[1-79]| |
86
|
|
|
|
|
|
|
9[145] |
87
|
|
|
|
|
|
|
', |
88
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3})(\\d{2})(\\d{2})' |
89
|
|
|
|
|
|
|
}, |
90
|
|
|
|
|
|
|
{ |
91
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
92
|
|
|
|
|
|
|
'leading_digits' => '8', |
93
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{3,4})' |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
]; |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
my $validators = { |
98
|
|
|
|
|
|
|
'fixed_line' => ' |
99
|
|
|
|
|
|
|
47\\d{7}| |
100
|
|
|
|
|
|
|
(?: |
101
|
|
|
|
|
|
|
1[2-8]| |
102
|
|
|
|
|
|
|
2[2-69]| |
103
|
|
|
|
|
|
|
3[2-4]| |
104
|
|
|
|
|
|
|
4[1-468]| |
105
|
|
|
|
|
|
|
5[24-689]| |
106
|
|
|
|
|
|
|
6[1-3578]| |
107
|
|
|
|
|
|
|
7[14-7]| |
108
|
|
|
|
|
|
|
8[1-79]| |
109
|
|
|
|
|
|
|
9[145] |
110
|
|
|
|
|
|
|
)(?: |
111
|
|
|
|
|
|
|
[02-9]\\d{6}| |
112
|
|
|
|
|
|
|
1(?: |
113
|
|
|
|
|
|
|
[0-8]\\d{5}| |
114
|
|
|
|
|
|
|
9\\d{3}(?: |
115
|
|
|
|
|
|
|
\\d{2} |
116
|
|
|
|
|
|
|
)? |
117
|
|
|
|
|
|
|
) |
118
|
|
|
|
|
|
|
) |
119
|
|
|
|
|
|
|
', |
120
|
|
|
|
|
|
|
'geographic' => ' |
121
|
|
|
|
|
|
|
47\\d{7}| |
122
|
|
|
|
|
|
|
(?: |
123
|
|
|
|
|
|
|
1[2-8]| |
124
|
|
|
|
|
|
|
2[2-69]| |
125
|
|
|
|
|
|
|
3[2-4]| |
126
|
|
|
|
|
|
|
4[1-468]| |
127
|
|
|
|
|
|
|
5[24-689]| |
128
|
|
|
|
|
|
|
6[1-3578]| |
129
|
|
|
|
|
|
|
7[14-7]| |
130
|
|
|
|
|
|
|
8[1-79]| |
131
|
|
|
|
|
|
|
9[145] |
132
|
|
|
|
|
|
|
)(?: |
133
|
|
|
|
|
|
|
[02-9]\\d{6}| |
134
|
|
|
|
|
|
|
1(?: |
135
|
|
|
|
|
|
|
[0-8]\\d{5}| |
136
|
|
|
|
|
|
|
9\\d{3}(?: |
137
|
|
|
|
|
|
|
\\d{2} |
138
|
|
|
|
|
|
|
)? |
139
|
|
|
|
|
|
|
) |
140
|
|
|
|
|
|
|
) |
141
|
|
|
|
|
|
|
', |
142
|
|
|
|
|
|
|
'mobile' => ' |
143
|
|
|
|
|
|
|
21(?: |
144
|
|
|
|
|
|
|
1(?: |
145
|
|
|
|
|
|
|
[145]\\d| |
146
|
|
|
|
|
|
|
3[1-5] |
147
|
|
|
|
|
|
|
)| |
148
|
|
|
|
|
|
|
2\\d\\d |
149
|
|
|
|
|
|
|
)\\d{4}| |
150
|
|
|
|
|
|
|
(?: |
151
|
|
|
|
|
|
|
45| |
152
|
|
|
|
|
|
|
5[0137]| |
153
|
|
|
|
|
|
|
6[069]| |
154
|
|
|
|
|
|
|
7[2389]| |
155
|
|
|
|
|
|
|
88 |
156
|
|
|
|
|
|
|
)\\d{7} |
157
|
|
|
|
|
|
|
', |
158
|
|
|
|
|
|
|
'pager' => '64\\d{4,7}', |
159
|
|
|
|
|
|
|
'personal_number' => '', |
160
|
|
|
|
|
|
|
'specialrate' => '(801\\d{6})|(70[01346-8]\\d{6})|(804\\d{6})', |
161
|
|
|
|
|
|
|
'toll_free' => '800\\d{6,7}', |
162
|
|
|
|
|
|
|
'voip' => '39\\d{7}' |
163
|
|
|
|
|
|
|
}; |
164
|
|
|
|
|
|
|
my %areanames = (); |
165
|
|
|
|
|
|
|
$areanames{en} = {"4875", "Jelenia\ Góra", |
166
|
|
|
|
|
|
|
"4882", "Chelm", |
167
|
|
|
|
|
|
|
"4846", "Skierniewice", |
168
|
|
|
|
|
|
|
"4884", "Zamość", |
169
|
|
|
|
|
|
|
"4891", "Szczecin", |
170
|
|
|
|
|
|
|
"4816", "Przemyśl", |
171
|
|
|
|
|
|
|
"4868", "Zielona\ Góra", |
172
|
|
|
|
|
|
|
"4877", "Opole", |
173
|
|
|
|
|
|
|
"4881", "Lublin", |
174
|
|
|
|
|
|
|
"4865", "Leszno", |
175
|
|
|
|
|
|
|
"4843", "Sieradz", |
176
|
|
|
|
|
|
|
"4833", "Bielsko\-Biala", |
177
|
|
|
|
|
|
|
"4813", "Krosno", |
178
|
|
|
|
|
|
|
"4867", "Pila", |
179
|
|
|
|
|
|
|
"4894", "Koszalin", |
180
|
|
|
|
|
|
|
"4848", "Radom", |
181
|
|
|
|
|
|
|
"4818", "Nowy\ Sącz", |
182
|
|
|
|
|
|
|
"4854", "Wloclawek", |
183
|
|
|
|
|
|
|
"4852", "Bydgoszcz", |
184
|
|
|
|
|
|
|
"4824", "Plock", |
185
|
|
|
|
|
|
|
"4822", "Warsaw", |
186
|
|
|
|
|
|
|
"4815", "Tarnobrzeg", |
187
|
|
|
|
|
|
|
"4817", "Rzeszów", |
188
|
|
|
|
|
|
|
"4876", "Legnica", |
189
|
|
|
|
|
|
|
"4863", "Konin", |
190
|
|
|
|
|
|
|
"4887", "Suwalki", |
191
|
|
|
|
|
|
|
"4861", "Poznań", |
192
|
|
|
|
|
|
|
"4885", "Bialystok", |
193
|
|
|
|
|
|
|
"4823", "Ciechanów", |
194
|
|
|
|
|
|
|
"4874", "Walbrzych", |
195
|
|
|
|
|
|
|
"4895", "Gorzów\ Wielkopolski", |
196
|
|
|
|
|
|
|
"4871", "Wroclaw", |
197
|
|
|
|
|
|
|
"4859", "Slupsk", |
198
|
|
|
|
|
|
|
"4856", "Toruń", |
199
|
|
|
|
|
|
|
"4829", "Ostrolęka", |
200
|
|
|
|
|
|
|
"4862", "Kalisz", |
201
|
|
|
|
|
|
|
"4825", "Siedlce", |
202
|
|
|
|
|
|
|
"4883", "Biala\ Podlaska", |
203
|
|
|
|
|
|
|
"4855", "Elbląg", |
204
|
|
|
|
|
|
|
"4841", "Kielce", |
205
|
|
|
|
|
|
|
"4844", "Piotrków\ Trybunalski", |
206
|
|
|
|
|
|
|
"4886", "Lomża", |
207
|
|
|
|
|
|
|
"4842", "Lódź", |
208
|
|
|
|
|
|
|
"4889", "Olsztyn", |
209
|
|
|
|
|
|
|
"4858", "Gdańsk", |
210
|
|
|
|
|
|
|
"4832", "Katowice", |
211
|
|
|
|
|
|
|
"4814", "Tarnów", |
212
|
|
|
|
|
|
|
"4812", "Kraków", |
213
|
|
|
|
|
|
|
"4834", "Częstochowa",}; |
214
|
|
|
|
|
|
|
$areanames{pl} = {"4883", "Biała\ Podlaska", |
215
|
|
|
|
|
|
|
"4886", "Łomża", |
216
|
|
|
|
|
|
|
"4842", "Łódź", |
217
|
|
|
|
|
|
|
"4887", "Suwałki", |
218
|
|
|
|
|
|
|
"4874", "Wałbrzych", |
219
|
|
|
|
|
|
|
"4885", "Białystok", |
220
|
|
|
|
|
|
|
"4829", "Ostrołęka", |
221
|
|
|
|
|
|
|
"4871", "Wrocław", |
222
|
|
|
|
|
|
|
"4859", "Słupsk", |
223
|
|
|
|
|
|
|
"4824", "Płock", |
224
|
|
|
|
|
|
|
"4822", "Warszawa", |
225
|
|
|
|
|
|
|
"4854", "Włocławek", |
226
|
|
|
|
|
|
|
"4882", "Chełm", |
227
|
|
|
|
|
|
|
"4867", "Piła", |
228
|
|
|
|
|
|
|
"4833", "Bielsko\-Biała",}; |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
sub new { |
231
|
25
|
|
|
25
|
1
|
62
|
my $class = shift; |
232
|
25
|
|
|
|
|
46
|
my $number = shift; |
233
|
25
|
|
|
|
|
181
|
$number =~ s/(^\+48|\D)//g; |
234
|
25
|
|
|
|
|
133
|
my $self = bless({ country_code => '48', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
235
|
25
|
100
|
|
|
|
124
|
return $self->is_valid() ? $self : undef; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
1; |