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