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::US; |
20
|
3
|
|
|
3
|
|
1973
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
15
|
|
|
3
|
|
|
|
|
436
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
27
|
use strict; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
97
|
|
23
|
3
|
|
|
3
|
|
18
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
100
|
|
24
|
3
|
|
|
3
|
|
18
|
use utf8; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
29
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174404; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1-$2', |
30
|
|
|
|
|
|
|
'leading_digits' => '310', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1-$2', |
35
|
|
|
|
|
|
|
'intl_format' => 'NA', |
36
|
|
|
|
|
|
|
'leading_digits' => ' |
37
|
|
|
|
|
|
|
[24-9]| |
38
|
|
|
|
|
|
|
3(?: |
39
|
|
|
|
|
|
|
[02-9]| |
40
|
|
|
|
|
|
|
1[1-9] |
41
|
|
|
|
|
|
|
) |
42
|
|
|
|
|
|
|
', |
43
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
44
|
|
|
|
|
|
|
}, |
45
|
|
|
|
|
|
|
{ |
46
|
|
|
|
|
|
|
'format' => '($1) $2-$3', |
47
|
|
|
|
|
|
|
'intl_format' => '$1-$2-$3', |
48
|
|
|
|
|
|
|
'leading_digits' => '[2-9]', |
49
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{4})' |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
]; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $validators = { |
54
|
|
|
|
|
|
|
'geographic' => '( |
55
|
|
|
|
|
|
|
5056(?: |
56
|
|
|
|
|
|
|
[0-35-9]\\d| |
57
|
|
|
|
|
|
|
4[46] |
58
|
|
|
|
|
|
|
)\\d{4}| |
59
|
|
|
|
|
|
|
(?: |
60
|
|
|
|
|
|
|
4722| |
61
|
|
|
|
|
|
|
505[2-57-9] |
62
|
|
|
|
|
|
|
)\\d{6}| |
63
|
|
|
|
|
|
|
(?: |
64
|
|
|
|
|
|
|
2(?: |
65
|
|
|
|
|
|
|
0[1-35-9]| |
66
|
|
|
|
|
|
|
1[02-9]| |
67
|
|
|
|
|
|
|
2[03-589]| |
68
|
|
|
|
|
|
|
3[149]| |
69
|
|
|
|
|
|
|
4[08]| |
70
|
|
|
|
|
|
|
5[1-46]| |
71
|
|
|
|
|
|
|
6[0279]| |
72
|
|
|
|
|
|
|
7[0269]| |
73
|
|
|
|
|
|
|
8[13] |
74
|
|
|
|
|
|
|
)| |
75
|
|
|
|
|
|
|
3(?: |
76
|
|
|
|
|
|
|
0[1-57-9]| |
77
|
|
|
|
|
|
|
1[02-9]| |
78
|
|
|
|
|
|
|
2[01356]| |
79
|
|
|
|
|
|
|
3[0-24679]| |
80
|
|
|
|
|
|
|
4[167]| |
81
|
|
|
|
|
|
|
5[0-2]| |
82
|
|
|
|
|
|
|
6[014]| |
83
|
|
|
|
|
|
|
8[056] |
84
|
|
|
|
|
|
|
)| |
85
|
|
|
|
|
|
|
4(?: |
86
|
|
|
|
|
|
|
0[124-9]| |
87
|
|
|
|
|
|
|
1[02-579]| |
88
|
|
|
|
|
|
|
2[3-5]| |
89
|
|
|
|
|
|
|
3[0245]| |
90
|
|
|
|
|
|
|
4[023578]| |
91
|
|
|
|
|
|
|
58| |
92
|
|
|
|
|
|
|
6[349]| |
93
|
|
|
|
|
|
|
7[0589]| |
94
|
|
|
|
|
|
|
8[04] |
95
|
|
|
|
|
|
|
)| |
96
|
|
|
|
|
|
|
5(?: |
97
|
|
|
|
|
|
|
0[1-47-9]| |
98
|
|
|
|
|
|
|
1[0235-8]| |
99
|
|
|
|
|
|
|
20| |
100
|
|
|
|
|
|
|
3[0149]| |
101
|
|
|
|
|
|
|
4[01]| |
102
|
|
|
|
|
|
|
5[179]| |
103
|
|
|
|
|
|
|
6[1-47]| |
104
|
|
|
|
|
|
|
7[0-5]| |
105
|
|
|
|
|
|
|
8[0256] |
106
|
|
|
|
|
|
|
)| |
107
|
|
|
|
|
|
|
6(?: |
108
|
|
|
|
|
|
|
0[1-35-9]| |
109
|
|
|
|
|
|
|
1[024-9]| |
110
|
|
|
|
|
|
|
2[03689]| |
111
|
|
|
|
|
|
|
[34][016]| |
112
|
|
|
|
|
|
|
5[01679]| |
113
|
|
|
|
|
|
|
6[0-279]| |
114
|
|
|
|
|
|
|
78| |
115
|
|
|
|
|
|
|
8[0-29] |
116
|
|
|
|
|
|
|
)| |
117
|
|
|
|
|
|
|
7(?: |
118
|
|
|
|
|
|
|
0[1-46-8]| |
119
|
|
|
|
|
|
|
1[2-9]| |
120
|
|
|
|
|
|
|
2[04-7]| |
121
|
|
|
|
|
|
|
3[1247]| |
122
|
|
|
|
|
|
|
4[037]| |
123
|
|
|
|
|
|
|
5[47]| |
124
|
|
|
|
|
|
|
6[02359]| |
125
|
|
|
|
|
|
|
7[0-59]| |
126
|
|
|
|
|
|
|
8[156] |
127
|
|
|
|
|
|
|
)| |
128
|
|
|
|
|
|
|
8(?: |
129
|
|
|
|
|
|
|
0[1-68]| |
130
|
|
|
|
|
|
|
1[02-8]| |
131
|
|
|
|
|
|
|
2[068]| |
132
|
|
|
|
|
|
|
3[0-2589]| |
133
|
|
|
|
|
|
|
4[03578]| |
134
|
|
|
|
|
|
|
5[046-9]| |
135
|
|
|
|
|
|
|
6[02-5]| |
136
|
|
|
|
|
|
|
7[028] |
137
|
|
|
|
|
|
|
)| |
138
|
|
|
|
|
|
|
9(?: |
139
|
|
|
|
|
|
|
0[1346-9]| |
140
|
|
|
|
|
|
|
1[02-9]| |
141
|
|
|
|
|
|
|
2[0589]| |
142
|
|
|
|
|
|
|
3[0146-8]| |
143
|
|
|
|
|
|
|
4[01357-9]| |
144
|
|
|
|
|
|
|
5[12469]| |
145
|
|
|
|
|
|
|
7[0-389]| |
146
|
|
|
|
|
|
|
8[04-69] |
147
|
|
|
|
|
|
|
) |
148
|
|
|
|
|
|
|
)[2-9]\\d{6} |
149
|
|
|
|
|
|
|
| |
150
|
|
|
|
|
|
|
5056(?: |
151
|
|
|
|
|
|
|
[0-35-9]\\d| |
152
|
|
|
|
|
|
|
4[46] |
153
|
|
|
|
|
|
|
)\\d{4}| |
154
|
|
|
|
|
|
|
(?: |
155
|
|
|
|
|
|
|
4722| |
156
|
|
|
|
|
|
|
505[2-57-9] |
157
|
|
|
|
|
|
|
)\\d{6}| |
158
|
|
|
|
|
|
|
(?: |
159
|
|
|
|
|
|
|
2(?: |
160
|
|
|
|
|
|
|
0[1-35-9]| |
161
|
|
|
|
|
|
|
1[02-9]| |
162
|
|
|
|
|
|
|
2[03-589]| |
163
|
|
|
|
|
|
|
3[149]| |
164
|
|
|
|
|
|
|
4[08]| |
165
|
|
|
|
|
|
|
5[1-46]| |
166
|
|
|
|
|
|
|
6[0279]| |
167
|
|
|
|
|
|
|
7[0269]| |
168
|
|
|
|
|
|
|
8[13] |
169
|
|
|
|
|
|
|
)| |
170
|
|
|
|
|
|
|
3(?: |
171
|
|
|
|
|
|
|
0[1-57-9]| |
172
|
|
|
|
|
|
|
1[02-9]| |
173
|
|
|
|
|
|
|
2[01356]| |
174
|
|
|
|
|
|
|
3[0-24679]| |
175
|
|
|
|
|
|
|
4[167]| |
176
|
|
|
|
|
|
|
5[0-2]| |
177
|
|
|
|
|
|
|
6[014]| |
178
|
|
|
|
|
|
|
8[056] |
179
|
|
|
|
|
|
|
)| |
180
|
|
|
|
|
|
|
4(?: |
181
|
|
|
|
|
|
|
0[124-9]| |
182
|
|
|
|
|
|
|
1[02-579]| |
183
|
|
|
|
|
|
|
2[3-5]| |
184
|
|
|
|
|
|
|
3[0245]| |
185
|
|
|
|
|
|
|
4[023578]| |
186
|
|
|
|
|
|
|
58| |
187
|
|
|
|
|
|
|
6[349]| |
188
|
|
|
|
|
|
|
7[0589]| |
189
|
|
|
|
|
|
|
8[04] |
190
|
|
|
|
|
|
|
)| |
191
|
|
|
|
|
|
|
5(?: |
192
|
|
|
|
|
|
|
0[1-47-9]| |
193
|
|
|
|
|
|
|
1[0235-8]| |
194
|
|
|
|
|
|
|
20| |
195
|
|
|
|
|
|
|
3[0149]| |
196
|
|
|
|
|
|
|
4[01]| |
197
|
|
|
|
|
|
|
5[179]| |
198
|
|
|
|
|
|
|
6[1-47]| |
199
|
|
|
|
|
|
|
7[0-5]| |
200
|
|
|
|
|
|
|
8[0256] |
201
|
|
|
|
|
|
|
)| |
202
|
|
|
|
|
|
|
6(?: |
203
|
|
|
|
|
|
|
0[1-35-9]| |
204
|
|
|
|
|
|
|
1[024-9]| |
205
|
|
|
|
|
|
|
2[03689]| |
206
|
|
|
|
|
|
|
[34][016]| |
207
|
|
|
|
|
|
|
5[01679]| |
208
|
|
|
|
|
|
|
6[0-279]| |
209
|
|
|
|
|
|
|
78| |
210
|
|
|
|
|
|
|
8[0-29] |
211
|
|
|
|
|
|
|
)| |
212
|
|
|
|
|
|
|
7(?: |
213
|
|
|
|
|
|
|
0[1-46-8]| |
214
|
|
|
|
|
|
|
1[2-9]| |
215
|
|
|
|
|
|
|
2[04-7]| |
216
|
|
|
|
|
|
|
3[1247]| |
217
|
|
|
|
|
|
|
4[037]| |
218
|
|
|
|
|
|
|
5[47]| |
219
|
|
|
|
|
|
|
6[02359]| |
220
|
|
|
|
|
|
|
7[0-59]| |
221
|
|
|
|
|
|
|
8[156] |
222
|
|
|
|
|
|
|
)| |
223
|
|
|
|
|
|
|
8(?: |
224
|
|
|
|
|
|
|
0[1-68]| |
225
|
|
|
|
|
|
|
1[02-8]| |
226
|
|
|
|
|
|
|
2[068]| |
227
|
|
|
|
|
|
|
3[0-2589]| |
228
|
|
|
|
|
|
|
4[03578]| |
229
|
|
|
|
|
|
|
5[046-9]| |
230
|
|
|
|
|
|
|
6[02-5]| |
231
|
|
|
|
|
|
|
7[028] |
232
|
|
|
|
|
|
|
)| |
233
|
|
|
|
|
|
|
9(?: |
234
|
|
|
|
|
|
|
0[1346-9]| |
235
|
|
|
|
|
|
|
1[02-9]| |
236
|
|
|
|
|
|
|
2[0589]| |
237
|
|
|
|
|
|
|
3[0146-8]| |
238
|
|
|
|
|
|
|
4[01357-9]| |
239
|
|
|
|
|
|
|
5[12469]| |
240
|
|
|
|
|
|
|
7[0-389]| |
241
|
|
|
|
|
|
|
8[04-69] |
242
|
|
|
|
|
|
|
) |
243
|
|
|
|
|
|
|
)[2-9]\\d{6} |
244
|
|
|
|
|
|
|
)', |
245
|
|
|
|
|
|
|
'pager' => '', |
246
|
|
|
|
|
|
|
'personal_number' => ' |
247
|
|
|
|
|
|
|
52(?: |
248
|
|
|
|
|
|
|
3(?: |
249
|
|
|
|
|
|
|
[2-46-9][02-9]\\d| |
250
|
|
|
|
|
|
|
5(?: |
251
|
|
|
|
|
|
|
[02-46-9]\\d| |
252
|
|
|
|
|
|
|
5[0-46-9] |
253
|
|
|
|
|
|
|
) |
254
|
|
|
|
|
|
|
)| |
255
|
|
|
|
|
|
|
4(?: |
256
|
|
|
|
|
|
|
[2-478][02-9]\\d| |
257
|
|
|
|
|
|
|
5(?: |
258
|
|
|
|
|
|
|
[034]\\d| |
259
|
|
|
|
|
|
|
2[024-9]| |
260
|
|
|
|
|
|
|
5[0-46-9] |
261
|
|
|
|
|
|
|
)| |
262
|
|
|
|
|
|
|
6(?: |
263
|
|
|
|
|
|
|
0[1-9]| |
264
|
|
|
|
|
|
|
[2-9]\\d |
265
|
|
|
|
|
|
|
)| |
266
|
|
|
|
|
|
|
9(?: |
267
|
|
|
|
|
|
|
[05-9]\\d| |
268
|
|
|
|
|
|
|
2[0-5]| |
269
|
|
|
|
|
|
|
49 |
270
|
|
|
|
|
|
|
) |
271
|
|
|
|
|
|
|
) |
272
|
|
|
|
|
|
|
)\\d{4}| |
273
|
|
|
|
|
|
|
52[34][2-9]1[02-9]\\d{4}| |
274
|
|
|
|
|
|
|
5(?: |
275
|
|
|
|
|
|
|
00| |
276
|
|
|
|
|
|
|
2[125-9]| |
277
|
|
|
|
|
|
|
33| |
278
|
|
|
|
|
|
|
44| |
279
|
|
|
|
|
|
|
66| |
280
|
|
|
|
|
|
|
77| |
281
|
|
|
|
|
|
|
88 |
282
|
|
|
|
|
|
|
)[2-9]\\d{6} |
283
|
|
|
|
|
|
|
', |
284
|
|
|
|
|
|
|
'specialrate' => '(900[2-9]\\d{6})', |
285
|
|
|
|
|
|
|
'toll_free' => ' |
286
|
|
|
|
|
|
|
8(?: |
287
|
|
|
|
|
|
|
00| |
288
|
|
|
|
|
|
|
33| |
289
|
|
|
|
|
|
|
44| |
290
|
|
|
|
|
|
|
55| |
291
|
|
|
|
|
|
|
66| |
292
|
|
|
|
|
|
|
77| |
293
|
|
|
|
|
|
|
88 |
294
|
|
|
|
|
|
|
)[2-9]\\d{6} |
295
|
|
|
|
|
|
|
', |
296
|
|
|
|
|
|
|
'voip' => '' |
297
|
|
|
|
|
|
|
}; |
298
|
3
|
|
|
3
|
|
569
|
use Number::Phone::NANP::Data; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
495
|
|
299
|
|
|
|
|
|
|
sub areaname { |
300
|
2
|
|
|
2
|
1
|
15
|
Number::Phone::NANP::Data::_areaname('1'.shift()->{number}); } |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
sub new { |
303
|
100
|
|
|
100
|
1
|
245
|
my $class = shift; |
304
|
100
|
|
|
|
|
176
|
my $number = shift; |
305
|
100
|
|
|
|
|
829
|
$number =~ s/(^\+1|\D)//g; |
306
|
100
|
|
|
|
|
734
|
my $self = bless({ country_code => '1', number => $number, formatters => $formatters, validators => $validators, }, $class); |
307
|
100
|
100
|
|
|
|
568
|
return $self->is_valid() ? $self : undef; |
308
|
|
|
|
|
|
|
} |
309
|
|
|
|
|
|
|
1; |