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