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
|
|
1157
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
211
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
46
|
|
23
|
2
|
|
|
2
|
|
18
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
51
|
|
24
|
2
|
|
|
2
|
|
12
|
use utf8; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
12
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181422; |
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[0-4]\\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{pl} = {"4859", "Słupsk", |
166
|
|
|
|
|
|
|
"4885", "Białystok", |
167
|
|
|
|
|
|
|
"4854", "Włocławek", |
168
|
|
|
|
|
|
|
"4833", "Bielsko\-Biała", |
169
|
|
|
|
|
|
|
"4867", "Piła", |
170
|
|
|
|
|
|
|
"4886", "Łomża", |
171
|
|
|
|
|
|
|
"4842", "Łódź", |
172
|
|
|
|
|
|
|
"4883", "Biała\ Podlaska", |
173
|
|
|
|
|
|
|
"4874", "Wałbrzych", |
174
|
|
|
|
|
|
|
"4871", "Wrocław", |
175
|
|
|
|
|
|
|
"4829", "Ostrołęka", |
176
|
|
|
|
|
|
|
"4824", "Płock", |
177
|
|
|
|
|
|
|
"4887", "Suwałki", |
178
|
|
|
|
|
|
|
"4822", "Warszawa", |
179
|
|
|
|
|
|
|
"4882", "Chełm",}; |
180
|
|
|
|
|
|
|
$areanames{en} = {"4874", "Walbrzych", |
181
|
|
|
|
|
|
|
"4858", "Gdańsk", |
182
|
|
|
|
|
|
|
"4884", "Zamość", |
183
|
|
|
|
|
|
|
"4846", "Skierniewice", |
184
|
|
|
|
|
|
|
"4889", "Olsztyn", |
185
|
|
|
|
|
|
|
"4863", "Konin", |
186
|
|
|
|
|
|
|
"4855", "Elbląg", |
187
|
|
|
|
|
|
|
"4848", "Radom", |
188
|
|
|
|
|
|
|
"4832", "Katowice", |
189
|
|
|
|
|
|
|
"4856", "Toruń", |
190
|
|
|
|
|
|
|
"4824", "Plock", |
191
|
|
|
|
|
|
|
"4814", "Tarnów", |
192
|
|
|
|
|
|
|
"4881", "Lublin", |
193
|
|
|
|
|
|
|
"4871", "Wroclaw", |
194
|
|
|
|
|
|
|
"4829", "Ostrolęka", |
195
|
|
|
|
|
|
|
"4834", "Częstochowa", |
196
|
|
|
|
|
|
|
"4812", "Kraków", |
197
|
|
|
|
|
|
|
"4865", "Leszno", |
198
|
|
|
|
|
|
|
"4822", "Warsaw", |
199
|
|
|
|
|
|
|
"4868", "Zielona\ Góra", |
200
|
|
|
|
|
|
|
"4887", "Suwalki", |
201
|
|
|
|
|
|
|
"4894", "Koszalin", |
202
|
|
|
|
|
|
|
"4877", "Opole", |
203
|
|
|
|
|
|
|
"4882", "Chelm", |
204
|
|
|
|
|
|
|
"4843", "Sieradz", |
205
|
|
|
|
|
|
|
"4891", "Szczecin", |
206
|
|
|
|
|
|
|
"4817", "Rzeszów", |
207
|
|
|
|
|
|
|
"4854", "Wloclawek", |
208
|
|
|
|
|
|
|
"4833", "Bielsko\-Biala", |
209
|
|
|
|
|
|
|
"4867", "Pila", |
210
|
|
|
|
|
|
|
"4816", "Przemyśl", |
211
|
|
|
|
|
|
|
"4841", "Kielce", |
212
|
|
|
|
|
|
|
"4859", "Slupsk", |
213
|
|
|
|
|
|
|
"4885", "Bialystok", |
214
|
|
|
|
|
|
|
"4875", "Jelenia\ Góra", |
215
|
|
|
|
|
|
|
"4876", "Legnica", |
216
|
|
|
|
|
|
|
"4886", "Lomża", |
217
|
|
|
|
|
|
|
"4844", "Piotrków\ Trybunalski", |
218
|
|
|
|
|
|
|
"4818", "Nowy\ Sącz", |
219
|
|
|
|
|
|
|
"4825", "Siedlce", |
220
|
|
|
|
|
|
|
"4815", "Tarnobrzeg", |
221
|
|
|
|
|
|
|
"4862", "Kalisz", |
222
|
|
|
|
|
|
|
"4842", "Lódź", |
223
|
|
|
|
|
|
|
"4895", "Gorzów\ Wielkopolski", |
224
|
|
|
|
|
|
|
"4883", "Biala\ Podlaska", |
225
|
|
|
|
|
|
|
"4813", "Krosno", |
226
|
|
|
|
|
|
|
"4852", "Bydgoszcz", |
227
|
|
|
|
|
|
|
"4861", "Poznań", |
228
|
|
|
|
|
|
|
"4823", "Ciechanów",}; |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
sub new { |
231
|
25
|
|
|
25
|
1
|
54
|
my $class = shift; |
232
|
25
|
|
|
|
|
44
|
my $number = shift; |
233
|
25
|
|
|
|
|
165
|
$number =~ s/(^\+48|\D)//g; |
234
|
25
|
|
|
|
|
136
|
my $self = bless({ country_code => '48', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
235
|
25
|
100
|
|
|
|
153
|
return $self->is_valid() ? $self : undef; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
1; |