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