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::BB; |
20
|
2
|
|
|
2
|
|
1224
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
229
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
29
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
48
|
|
23
|
2
|
|
|
2
|
|
17
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
84
|
|
24
|
2
|
|
|
2
|
|
15
|
use utf8; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
19
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174401; |
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
|
|
|
|
|
|
|
'fixed_line' => ' |
55
|
|
|
|
|
|
|
246521[0369]\\d{3}| |
56
|
|
|
|
|
|
|
246(?: |
57
|
|
|
|
|
|
|
2(?: |
58
|
|
|
|
|
|
|
2[78]| |
59
|
|
|
|
|
|
|
7[0-4] |
60
|
|
|
|
|
|
|
)| |
61
|
|
|
|
|
|
|
4(?: |
62
|
|
|
|
|
|
|
1[024-6]| |
63
|
|
|
|
|
|
|
2\\d| |
64
|
|
|
|
|
|
|
3[2-9] |
65
|
|
|
|
|
|
|
)| |
66
|
|
|
|
|
|
|
5(?: |
67
|
|
|
|
|
|
|
20| |
68
|
|
|
|
|
|
|
[34]\\d| |
69
|
|
|
|
|
|
|
54| |
70
|
|
|
|
|
|
|
7[1-3] |
71
|
|
|
|
|
|
|
)| |
72
|
|
|
|
|
|
|
6(?: |
73
|
|
|
|
|
|
|
2\\d| |
74
|
|
|
|
|
|
|
38 |
75
|
|
|
|
|
|
|
)| |
76
|
|
|
|
|
|
|
7[35]7| |
77
|
|
|
|
|
|
|
9(?: |
78
|
|
|
|
|
|
|
1[89]| |
79
|
|
|
|
|
|
|
63 |
80
|
|
|
|
|
|
|
) |
81
|
|
|
|
|
|
|
)\\d{4} |
82
|
|
|
|
|
|
|
', |
83
|
|
|
|
|
|
|
'geographic' => ' |
84
|
|
|
|
|
|
|
246521[0369]\\d{3}| |
85
|
|
|
|
|
|
|
246(?: |
86
|
|
|
|
|
|
|
2(?: |
87
|
|
|
|
|
|
|
2[78]| |
88
|
|
|
|
|
|
|
7[0-4] |
89
|
|
|
|
|
|
|
)| |
90
|
|
|
|
|
|
|
4(?: |
91
|
|
|
|
|
|
|
1[024-6]| |
92
|
|
|
|
|
|
|
2\\d| |
93
|
|
|
|
|
|
|
3[2-9] |
94
|
|
|
|
|
|
|
)| |
95
|
|
|
|
|
|
|
5(?: |
96
|
|
|
|
|
|
|
20| |
97
|
|
|
|
|
|
|
[34]\\d| |
98
|
|
|
|
|
|
|
54| |
99
|
|
|
|
|
|
|
7[1-3] |
100
|
|
|
|
|
|
|
)| |
101
|
|
|
|
|
|
|
6(?: |
102
|
|
|
|
|
|
|
2\\d| |
103
|
|
|
|
|
|
|
38 |
104
|
|
|
|
|
|
|
)| |
105
|
|
|
|
|
|
|
7[35]7| |
106
|
|
|
|
|
|
|
9(?: |
107
|
|
|
|
|
|
|
1[89]| |
108
|
|
|
|
|
|
|
63 |
109
|
|
|
|
|
|
|
) |
110
|
|
|
|
|
|
|
)\\d{4} |
111
|
|
|
|
|
|
|
', |
112
|
|
|
|
|
|
|
'mobile' => ' |
113
|
|
|
|
|
|
|
246(?: |
114
|
|
|
|
|
|
|
(?: |
115
|
|
|
|
|
|
|
2(?: |
116
|
|
|
|
|
|
|
[3568]\\d| |
117
|
|
|
|
|
|
|
4[0-57-9] |
118
|
|
|
|
|
|
|
)| |
119
|
|
|
|
|
|
|
3(?: |
120
|
|
|
|
|
|
|
5[2-9]| |
121
|
|
|
|
|
|
|
6[0-6] |
122
|
|
|
|
|
|
|
)| |
123
|
|
|
|
|
|
|
4(?: |
124
|
|
|
|
|
|
|
46| |
125
|
|
|
|
|
|
|
5\\d |
126
|
|
|
|
|
|
|
)| |
127
|
|
|
|
|
|
|
69[5-7]| |
128
|
|
|
|
|
|
|
8(?: |
129
|
|
|
|
|
|
|
[2-5]\\d| |
130
|
|
|
|
|
|
|
83 |
131
|
|
|
|
|
|
|
) |
132
|
|
|
|
|
|
|
)\\d| |
133
|
|
|
|
|
|
|
52(?: |
134
|
|
|
|
|
|
|
1[147]| |
135
|
|
|
|
|
|
|
20 |
136
|
|
|
|
|
|
|
) |
137
|
|
|
|
|
|
|
)\\d{3} |
138
|
|
|
|
|
|
|
', |
139
|
|
|
|
|
|
|
'pager' => '', |
140
|
|
|
|
|
|
|
'personal_number' => ' |
141
|
|
|
|
|
|
|
52(?: |
142
|
|
|
|
|
|
|
3(?: |
143
|
|
|
|
|
|
|
[2-46-9][02-9]\\d| |
144
|
|
|
|
|
|
|
5(?: |
145
|
|
|
|
|
|
|
[02-46-9]\\d| |
146
|
|
|
|
|
|
|
5[0-46-9] |
147
|
|
|
|
|
|
|
) |
148
|
|
|
|
|
|
|
)| |
149
|
|
|
|
|
|
|
4(?: |
150
|
|
|
|
|
|
|
[2-478][02-9]\\d| |
151
|
|
|
|
|
|
|
5(?: |
152
|
|
|
|
|
|
|
[034]\\d| |
153
|
|
|
|
|
|
|
2[024-9]| |
154
|
|
|
|
|
|
|
5[0-46-9] |
155
|
|
|
|
|
|
|
)| |
156
|
|
|
|
|
|
|
6(?: |
157
|
|
|
|
|
|
|
0[1-9]| |
158
|
|
|
|
|
|
|
[2-9]\\d |
159
|
|
|
|
|
|
|
)| |
160
|
|
|
|
|
|
|
9(?: |
161
|
|
|
|
|
|
|
[05-9]\\d| |
162
|
|
|
|
|
|
|
2[0-5]| |
163
|
|
|
|
|
|
|
49 |
164
|
|
|
|
|
|
|
) |
165
|
|
|
|
|
|
|
) |
166
|
|
|
|
|
|
|
)\\d{4}| |
167
|
|
|
|
|
|
|
52[34][2-9]1[02-9]\\d{4}| |
168
|
|
|
|
|
|
|
5(?: |
169
|
|
|
|
|
|
|
00| |
170
|
|
|
|
|
|
|
2[125-9]| |
171
|
|
|
|
|
|
|
33| |
172
|
|
|
|
|
|
|
44| |
173
|
|
|
|
|
|
|
66| |
174
|
|
|
|
|
|
|
77| |
175
|
|
|
|
|
|
|
88 |
176
|
|
|
|
|
|
|
)[2-9]\\d{6} |
177
|
|
|
|
|
|
|
', |
178
|
|
|
|
|
|
|
'specialrate' => '( |
179
|
|
|
|
|
|
|
(?: |
180
|
|
|
|
|
|
|
246976| |
181
|
|
|
|
|
|
|
900[2-9]\\d\\d |
182
|
|
|
|
|
|
|
)\\d{4} |
183
|
|
|
|
|
|
|
)|( |
184
|
|
|
|
|
|
|
246(?: |
185
|
|
|
|
|
|
|
292| |
186
|
|
|
|
|
|
|
367| |
187
|
|
|
|
|
|
|
4(?: |
188
|
|
|
|
|
|
|
1[7-9]| |
189
|
|
|
|
|
|
|
3[01]| |
190
|
|
|
|
|
|
|
4[47-9]| |
191
|
|
|
|
|
|
|
67 |
192
|
|
|
|
|
|
|
)| |
193
|
|
|
|
|
|
|
7(?: |
194
|
|
|
|
|
|
|
1[2-9]| |
195
|
|
|
|
|
|
|
2\\d| |
196
|
|
|
|
|
|
|
3[016]| |
197
|
|
|
|
|
|
|
53 |
198
|
|
|
|
|
|
|
) |
199
|
|
|
|
|
|
|
)\\d{4} |
200
|
|
|
|
|
|
|
)', |
201
|
|
|
|
|
|
|
'toll_free' => ' |
202
|
|
|
|
|
|
|
8(?: |
203
|
|
|
|
|
|
|
00| |
204
|
|
|
|
|
|
|
33| |
205
|
|
|
|
|
|
|
44| |
206
|
|
|
|
|
|
|
55| |
207
|
|
|
|
|
|
|
66| |
208
|
|
|
|
|
|
|
77| |
209
|
|
|
|
|
|
|
88 |
210
|
|
|
|
|
|
|
)[2-9]\\d{6} |
211
|
|
|
|
|
|
|
', |
212
|
|
|
|
|
|
|
'voip' => '24631\\d{5}' |
213
|
|
|
|
|
|
|
}; |
214
|
2
|
|
|
2
|
|
372
|
use Number::Phone::NANP::Data; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
393
|
|
215
|
|
|
|
|
|
|
sub areaname { |
216
|
|
|
|
|
|
|
# uncoverable subroutine - no data for most NANP countries |
217
|
|
|
|
|
|
|
# uncoverable statement |
218
|
0
|
|
|
0
|
1
|
0
|
Number::Phone::NANP::Data::_areaname('1'.shift()->{number}); } |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
sub new { |
221
|
17
|
|
|
17
|
1
|
262
|
my $class = shift; |
222
|
17
|
|
|
|
|
151
|
my $number = shift; |
223
|
17
|
|
|
|
|
115
|
$number =~ s/(^\+1|\D)//g; |
224
|
17
|
|
|
|
|
97
|
my $self = bless({ country_code => '1', number => $number, formatters => $formatters, validators => $validators, }, $class); |
225
|
17
|
100
|
|
|
|
84
|
return $self->is_valid() ? $self : undef; |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
1; |