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::GD; |
20
|
2
|
|
|
2
|
|
1204
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
238
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
31
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
48
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
108
|
|
24
|
2
|
|
|
2
|
|
17
|
use utf8; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
18
|
|
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
|
|
|
|
|
|
|
'fixed_line' => ' |
55
|
|
|
|
|
|
|
473(?: |
56
|
|
|
|
|
|
|
2(?: |
57
|
|
|
|
|
|
|
3[0-2]| |
58
|
|
|
|
|
|
|
69 |
59
|
|
|
|
|
|
|
)| |
60
|
|
|
|
|
|
|
3(?: |
61
|
|
|
|
|
|
|
2[89]| |
62
|
|
|
|
|
|
|
86 |
63
|
|
|
|
|
|
|
)| |
64
|
|
|
|
|
|
|
4(?: |
65
|
|
|
|
|
|
|
[06]8| |
66
|
|
|
|
|
|
|
3[5-9]| |
67
|
|
|
|
|
|
|
4[0-49]| |
68
|
|
|
|
|
|
|
5[5-79]| |
69
|
|
|
|
|
|
|
73| |
70
|
|
|
|
|
|
|
90 |
71
|
|
|
|
|
|
|
)| |
72
|
|
|
|
|
|
|
63[68]| |
73
|
|
|
|
|
|
|
7(?: |
74
|
|
|
|
|
|
|
58| |
75
|
|
|
|
|
|
|
84 |
76
|
|
|
|
|
|
|
)| |
77
|
|
|
|
|
|
|
800| |
78
|
|
|
|
|
|
|
938 |
79
|
|
|
|
|
|
|
)\\d{4} |
80
|
|
|
|
|
|
|
', |
81
|
|
|
|
|
|
|
'geographic' => ' |
82
|
|
|
|
|
|
|
473(?: |
83
|
|
|
|
|
|
|
2(?: |
84
|
|
|
|
|
|
|
3[0-2]| |
85
|
|
|
|
|
|
|
69 |
86
|
|
|
|
|
|
|
)| |
87
|
|
|
|
|
|
|
3(?: |
88
|
|
|
|
|
|
|
2[89]| |
89
|
|
|
|
|
|
|
86 |
90
|
|
|
|
|
|
|
)| |
91
|
|
|
|
|
|
|
4(?: |
92
|
|
|
|
|
|
|
[06]8| |
93
|
|
|
|
|
|
|
3[5-9]| |
94
|
|
|
|
|
|
|
4[0-49]| |
95
|
|
|
|
|
|
|
5[5-79]| |
96
|
|
|
|
|
|
|
73| |
97
|
|
|
|
|
|
|
90 |
98
|
|
|
|
|
|
|
)| |
99
|
|
|
|
|
|
|
63[68]| |
100
|
|
|
|
|
|
|
7(?: |
101
|
|
|
|
|
|
|
58| |
102
|
|
|
|
|
|
|
84 |
103
|
|
|
|
|
|
|
)| |
104
|
|
|
|
|
|
|
800| |
105
|
|
|
|
|
|
|
938 |
106
|
|
|
|
|
|
|
)\\d{4} |
107
|
|
|
|
|
|
|
', |
108
|
|
|
|
|
|
|
'mobile' => ' |
109
|
|
|
|
|
|
|
473(?: |
110
|
|
|
|
|
|
|
4(?: |
111
|
|
|
|
|
|
|
0[2-79]| |
112
|
|
|
|
|
|
|
1[04-9]| |
113
|
|
|
|
|
|
|
2[0-5]| |
114
|
|
|
|
|
|
|
58 |
115
|
|
|
|
|
|
|
)| |
116
|
|
|
|
|
|
|
5(?: |
117
|
|
|
|
|
|
|
2[01]| |
118
|
|
|
|
|
|
|
3[3-8] |
119
|
|
|
|
|
|
|
)| |
120
|
|
|
|
|
|
|
901 |
121
|
|
|
|
|
|
|
)\\d{4} |
122
|
|
|
|
|
|
|
', |
123
|
|
|
|
|
|
|
'pager' => '', |
124
|
|
|
|
|
|
|
'personal_number' => ' |
125
|
|
|
|
|
|
|
52(?: |
126
|
|
|
|
|
|
|
3(?: |
127
|
|
|
|
|
|
|
[2-46-9][02-9]\\d| |
128
|
|
|
|
|
|
|
5(?: |
129
|
|
|
|
|
|
|
[02-46-9]\\d| |
130
|
|
|
|
|
|
|
5[0-46-9] |
131
|
|
|
|
|
|
|
) |
132
|
|
|
|
|
|
|
)| |
133
|
|
|
|
|
|
|
4(?: |
134
|
|
|
|
|
|
|
[2-478][02-9]\\d| |
135
|
|
|
|
|
|
|
5(?: |
136
|
|
|
|
|
|
|
[034]\\d| |
137
|
|
|
|
|
|
|
2[024-9]| |
138
|
|
|
|
|
|
|
5[0-46-9] |
139
|
|
|
|
|
|
|
)| |
140
|
|
|
|
|
|
|
6(?: |
141
|
|
|
|
|
|
|
0[1-9]| |
142
|
|
|
|
|
|
|
[2-9]\\d |
143
|
|
|
|
|
|
|
)| |
144
|
|
|
|
|
|
|
9(?: |
145
|
|
|
|
|
|
|
[05-9]\\d| |
146
|
|
|
|
|
|
|
2[0-5]| |
147
|
|
|
|
|
|
|
49 |
148
|
|
|
|
|
|
|
) |
149
|
|
|
|
|
|
|
) |
150
|
|
|
|
|
|
|
)\\d{4}| |
151
|
|
|
|
|
|
|
52[34][2-9]1[02-9]\\d{4}| |
152
|
|
|
|
|
|
|
5(?: |
153
|
|
|
|
|
|
|
00| |
154
|
|
|
|
|
|
|
2[125-9]| |
155
|
|
|
|
|
|
|
33| |
156
|
|
|
|
|
|
|
44| |
157
|
|
|
|
|
|
|
66| |
158
|
|
|
|
|
|
|
77| |
159
|
|
|
|
|
|
|
88 |
160
|
|
|
|
|
|
|
)[2-9]\\d{6} |
161
|
|
|
|
|
|
|
', |
162
|
|
|
|
|
|
|
'specialrate' => '(900[2-9]\\d{6})', |
163
|
|
|
|
|
|
|
'toll_free' => ' |
164
|
|
|
|
|
|
|
8(?: |
165
|
|
|
|
|
|
|
00| |
166
|
|
|
|
|
|
|
33| |
167
|
|
|
|
|
|
|
44| |
168
|
|
|
|
|
|
|
55| |
169
|
|
|
|
|
|
|
66| |
170
|
|
|
|
|
|
|
77| |
171
|
|
|
|
|
|
|
88 |
172
|
|
|
|
|
|
|
)[2-9]\\d{6} |
173
|
|
|
|
|
|
|
', |
174
|
|
|
|
|
|
|
'voip' => '' |
175
|
|
|
|
|
|
|
}; |
176
|
2
|
|
|
2
|
|
339
|
use Number::Phone::NANP::Data; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
397
|
|
177
|
|
|
|
|
|
|
sub areaname { |
178
|
|
|
|
|
|
|
# uncoverable subroutine - no data for most NANP countries |
179
|
|
|
|
|
|
|
# uncoverable statement |
180
|
0
|
|
|
0
|
1
|
0
|
Number::Phone::NANP::Data::_areaname('1'.shift()->{number}); } |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
sub new { |
183
|
13
|
|
|
13
|
1
|
34
|
my $class = shift; |
184
|
13
|
|
|
|
|
42
|
my $number = shift; |
185
|
13
|
|
|
|
|
92
|
$number =~ s/(^\+1|\D)//g; |
186
|
13
|
|
|
|
|
68
|
my $self = bless({ country_code => '1', number => $number, formatters => $formatters, validators => $validators, }, $class); |
187
|
13
|
100
|
|
|
|
71
|
return $self->is_valid() ? $self : undef; |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
1; |