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::PA; |
20
|
2
|
|
|
2
|
|
1202
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
237
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
56
|
|
23
|
2
|
|
|
2
|
|
19
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
50
|
|
24
|
2
|
|
|
2
|
|
12
|
use utf8; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
12
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181421; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1-$2', |
30
|
|
|
|
|
|
|
'leading_digits' => '[1-57-9]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1-$2', |
35
|
|
|
|
|
|
|
'leading_digits' => '[68]', |
36
|
|
|
|
|
|
|
'pattern' => '(\\d{4})(\\d{4})' |
37
|
|
|
|
|
|
|
}, |
38
|
|
|
|
|
|
|
{ |
39
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
40
|
|
|
|
|
|
|
'leading_digits' => '8', |
41
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{4})' |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
]; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $validators = { |
46
|
|
|
|
|
|
|
'fixed_line' => ' |
47
|
|
|
|
|
|
|
(?: |
48
|
|
|
|
|
|
|
1(?: |
49
|
|
|
|
|
|
|
0\\d| |
50
|
|
|
|
|
|
|
1[479]| |
51
|
|
|
|
|
|
|
2[37]| |
52
|
|
|
|
|
|
|
3[0137]| |
53
|
|
|
|
|
|
|
4[17]| |
54
|
|
|
|
|
|
|
5[05]| |
55
|
|
|
|
|
|
|
6[58]| |
56
|
|
|
|
|
|
|
7[0167]| |
57
|
|
|
|
|
|
|
8[2358]| |
58
|
|
|
|
|
|
|
9[1389] |
59
|
|
|
|
|
|
|
)| |
60
|
|
|
|
|
|
|
2(?: |
61
|
|
|
|
|
|
|
[0235-79]\\d| |
62
|
|
|
|
|
|
|
1[0-7]| |
63
|
|
|
|
|
|
|
4[013-9]| |
64
|
|
|
|
|
|
|
8[02-9] |
65
|
|
|
|
|
|
|
)| |
66
|
|
|
|
|
|
|
3(?: |
67
|
|
|
|
|
|
|
[089]\\d| |
68
|
|
|
|
|
|
|
1[0-7]| |
69
|
|
|
|
|
|
|
2[0-5]| |
70
|
|
|
|
|
|
|
33| |
71
|
|
|
|
|
|
|
4[0-79]| |
72
|
|
|
|
|
|
|
5[0-35]| |
73
|
|
|
|
|
|
|
6[068]| |
74
|
|
|
|
|
|
|
7[0-8] |
75
|
|
|
|
|
|
|
)| |
76
|
|
|
|
|
|
|
4(?: |
77
|
|
|
|
|
|
|
00| |
78
|
|
|
|
|
|
|
3[0-579]| |
79
|
|
|
|
|
|
|
4\\d| |
80
|
|
|
|
|
|
|
7[0-57-9] |
81
|
|
|
|
|
|
|
)| |
82
|
|
|
|
|
|
|
5(?: |
83
|
|
|
|
|
|
|
[01]\\d| |
84
|
|
|
|
|
|
|
2[0-7]| |
85
|
|
|
|
|
|
|
[56]0| |
86
|
|
|
|
|
|
|
79 |
87
|
|
|
|
|
|
|
)| |
88
|
|
|
|
|
|
|
7(?: |
89
|
|
|
|
|
|
|
0[09]| |
90
|
|
|
|
|
|
|
2[0-26-8]| |
91
|
|
|
|
|
|
|
3[03]| |
92
|
|
|
|
|
|
|
4[04]| |
93
|
|
|
|
|
|
|
5[05-9]| |
94
|
|
|
|
|
|
|
6[056]| |
95
|
|
|
|
|
|
|
7[0-24-9]| |
96
|
|
|
|
|
|
|
8[5-9]| |
97
|
|
|
|
|
|
|
90 |
98
|
|
|
|
|
|
|
)| |
99
|
|
|
|
|
|
|
8(?: |
100
|
|
|
|
|
|
|
09| |
101
|
|
|
|
|
|
|
2[89]| |
102
|
|
|
|
|
|
|
3\\d| |
103
|
|
|
|
|
|
|
4[0-24-689]| |
104
|
|
|
|
|
|
|
5[014]| |
105
|
|
|
|
|
|
|
8[02] |
106
|
|
|
|
|
|
|
)| |
107
|
|
|
|
|
|
|
9(?: |
108
|
|
|
|
|
|
|
0[5-9]| |
109
|
|
|
|
|
|
|
1[0135-8]| |
110
|
|
|
|
|
|
|
2[036-9]| |
111
|
|
|
|
|
|
|
3[35-79]| |
112
|
|
|
|
|
|
|
40| |
113
|
|
|
|
|
|
|
5[0457-9]| |
114
|
|
|
|
|
|
|
6[05-9]| |
115
|
|
|
|
|
|
|
7[04-9]| |
116
|
|
|
|
|
|
|
8[35-8]| |
117
|
|
|
|
|
|
|
9\\d |
118
|
|
|
|
|
|
|
) |
119
|
|
|
|
|
|
|
)\\d{4} |
120
|
|
|
|
|
|
|
', |
121
|
|
|
|
|
|
|
'geographic' => ' |
122
|
|
|
|
|
|
|
(?: |
123
|
|
|
|
|
|
|
1(?: |
124
|
|
|
|
|
|
|
0\\d| |
125
|
|
|
|
|
|
|
1[479]| |
126
|
|
|
|
|
|
|
2[37]| |
127
|
|
|
|
|
|
|
3[0137]| |
128
|
|
|
|
|
|
|
4[17]| |
129
|
|
|
|
|
|
|
5[05]| |
130
|
|
|
|
|
|
|
6[58]| |
131
|
|
|
|
|
|
|
7[0167]| |
132
|
|
|
|
|
|
|
8[2358]| |
133
|
|
|
|
|
|
|
9[1389] |
134
|
|
|
|
|
|
|
)| |
135
|
|
|
|
|
|
|
2(?: |
136
|
|
|
|
|
|
|
[0235-79]\\d| |
137
|
|
|
|
|
|
|
1[0-7]| |
138
|
|
|
|
|
|
|
4[013-9]| |
139
|
|
|
|
|
|
|
8[02-9] |
140
|
|
|
|
|
|
|
)| |
141
|
|
|
|
|
|
|
3(?: |
142
|
|
|
|
|
|
|
[089]\\d| |
143
|
|
|
|
|
|
|
1[0-7]| |
144
|
|
|
|
|
|
|
2[0-5]| |
145
|
|
|
|
|
|
|
33| |
146
|
|
|
|
|
|
|
4[0-79]| |
147
|
|
|
|
|
|
|
5[0-35]| |
148
|
|
|
|
|
|
|
6[068]| |
149
|
|
|
|
|
|
|
7[0-8] |
150
|
|
|
|
|
|
|
)| |
151
|
|
|
|
|
|
|
4(?: |
152
|
|
|
|
|
|
|
00| |
153
|
|
|
|
|
|
|
3[0-579]| |
154
|
|
|
|
|
|
|
4\\d| |
155
|
|
|
|
|
|
|
7[0-57-9] |
156
|
|
|
|
|
|
|
)| |
157
|
|
|
|
|
|
|
5(?: |
158
|
|
|
|
|
|
|
[01]\\d| |
159
|
|
|
|
|
|
|
2[0-7]| |
160
|
|
|
|
|
|
|
[56]0| |
161
|
|
|
|
|
|
|
79 |
162
|
|
|
|
|
|
|
)| |
163
|
|
|
|
|
|
|
7(?: |
164
|
|
|
|
|
|
|
0[09]| |
165
|
|
|
|
|
|
|
2[0-26-8]| |
166
|
|
|
|
|
|
|
3[03]| |
167
|
|
|
|
|
|
|
4[04]| |
168
|
|
|
|
|
|
|
5[05-9]| |
169
|
|
|
|
|
|
|
6[056]| |
170
|
|
|
|
|
|
|
7[0-24-9]| |
171
|
|
|
|
|
|
|
8[5-9]| |
172
|
|
|
|
|
|
|
90 |
173
|
|
|
|
|
|
|
)| |
174
|
|
|
|
|
|
|
8(?: |
175
|
|
|
|
|
|
|
09| |
176
|
|
|
|
|
|
|
2[89]| |
177
|
|
|
|
|
|
|
3\\d| |
178
|
|
|
|
|
|
|
4[0-24-689]| |
179
|
|
|
|
|
|
|
5[014]| |
180
|
|
|
|
|
|
|
8[02] |
181
|
|
|
|
|
|
|
)| |
182
|
|
|
|
|
|
|
9(?: |
183
|
|
|
|
|
|
|
0[5-9]| |
184
|
|
|
|
|
|
|
1[0135-8]| |
185
|
|
|
|
|
|
|
2[036-9]| |
186
|
|
|
|
|
|
|
3[35-79]| |
187
|
|
|
|
|
|
|
40| |
188
|
|
|
|
|
|
|
5[0457-9]| |
189
|
|
|
|
|
|
|
6[05-9]| |
190
|
|
|
|
|
|
|
7[04-9]| |
191
|
|
|
|
|
|
|
8[35-8]| |
192
|
|
|
|
|
|
|
9\\d |
193
|
|
|
|
|
|
|
) |
194
|
|
|
|
|
|
|
)\\d{4} |
195
|
|
|
|
|
|
|
', |
196
|
|
|
|
|
|
|
'mobile' => ' |
197
|
|
|
|
|
|
|
(?: |
198
|
|
|
|
|
|
|
1[16]1| |
199
|
|
|
|
|
|
|
21[89]| |
200
|
|
|
|
|
|
|
6\\d{3}| |
201
|
|
|
|
|
|
|
8(?: |
202
|
|
|
|
|
|
|
1[01]| |
203
|
|
|
|
|
|
|
7[23] |
204
|
|
|
|
|
|
|
) |
205
|
|
|
|
|
|
|
)\\d{4} |
206
|
|
|
|
|
|
|
', |
207
|
|
|
|
|
|
|
'pager' => '', |
208
|
|
|
|
|
|
|
'personal_number' => '', |
209
|
|
|
|
|
|
|
'specialrate' => '( |
210
|
|
|
|
|
|
|
(?: |
211
|
|
|
|
|
|
|
8(?: |
212
|
|
|
|
|
|
|
22| |
213
|
|
|
|
|
|
|
55| |
214
|
|
|
|
|
|
|
60| |
215
|
|
|
|
|
|
|
7[78]| |
216
|
|
|
|
|
|
|
86 |
217
|
|
|
|
|
|
|
)| |
218
|
|
|
|
|
|
|
9(?: |
219
|
|
|
|
|
|
|
00| |
220
|
|
|
|
|
|
|
81 |
221
|
|
|
|
|
|
|
) |
222
|
|
|
|
|
|
|
)\\d{4} |
223
|
|
|
|
|
|
|
)', |
224
|
|
|
|
|
|
|
'toll_free' => ' |
225
|
|
|
|
|
|
|
800\\d{4,5}| |
226
|
|
|
|
|
|
|
(?: |
227
|
|
|
|
|
|
|
00800| |
228
|
|
|
|
|
|
|
800\\d |
229
|
|
|
|
|
|
|
)\\d{6} |
230
|
|
|
|
|
|
|
', |
231
|
|
|
|
|
|
|
'voip' => '' |
232
|
|
|
|
|
|
|
}; |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
sub new { |
235
|
13
|
|
|
13
|
1
|
39
|
my $class = shift; |
236
|
13
|
|
|
|
|
32
|
my $number = shift; |
237
|
13
|
|
|
|
|
87
|
$number =~ s/(^\+507|\D)//g; |
238
|
13
|
|
|
|
|
69
|
my $self = bless({ country_code => '507', number => $number, formatters => $formatters, validators => $validators, }, $class); |
239
|
13
|
100
|
|
|
|
57
|
return $self->is_valid() ? $self : undef; |
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
1; |