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::DO; |
20
|
2
|
|
|
2
|
|
1134
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
236
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
19
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
51
|
|
23
|
2
|
|
|
2
|
|
15
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
61
|
|
24
|
2
|
|
|
2
|
|
21
|
use utf8; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
21
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181419; |
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
|
|
|
|
|
|
|
8(?: |
56
|
|
|
|
|
|
|
[04]9[2-9]\\d\\d| |
57
|
|
|
|
|
|
|
29(?: |
58
|
|
|
|
|
|
|
2(?: |
59
|
|
|
|
|
|
|
[0-59]\\d| |
60
|
|
|
|
|
|
|
6[04-9]| |
61
|
|
|
|
|
|
|
7[0-27]| |
62
|
|
|
|
|
|
|
8[0237-9] |
63
|
|
|
|
|
|
|
)| |
64
|
|
|
|
|
|
|
3(?: |
65
|
|
|
|
|
|
|
[0-35-9]\\d| |
66
|
|
|
|
|
|
|
4[7-9] |
67
|
|
|
|
|
|
|
)| |
68
|
|
|
|
|
|
|
[45]\\d\\d| |
69
|
|
|
|
|
|
|
6(?: |
70
|
|
|
|
|
|
|
[0-27-9]\\d| |
71
|
|
|
|
|
|
|
[3-5][1-9]| |
72
|
|
|
|
|
|
|
6[0135-8] |
73
|
|
|
|
|
|
|
)| |
74
|
|
|
|
|
|
|
7(?: |
75
|
|
|
|
|
|
|
0[013-9]| |
76
|
|
|
|
|
|
|
[1-37]\\d| |
77
|
|
|
|
|
|
|
4[1-35689]| |
78
|
|
|
|
|
|
|
5[1-4689]| |
79
|
|
|
|
|
|
|
6[1-57-9]| |
80
|
|
|
|
|
|
|
8[1-79]| |
81
|
|
|
|
|
|
|
9[1-8] |
82
|
|
|
|
|
|
|
)| |
83
|
|
|
|
|
|
|
8(?: |
84
|
|
|
|
|
|
|
0[146-9]| |
85
|
|
|
|
|
|
|
1[0-48]| |
86
|
|
|
|
|
|
|
[248]\\d| |
87
|
|
|
|
|
|
|
3[1-79]| |
88
|
|
|
|
|
|
|
5[01589]| |
89
|
|
|
|
|
|
|
6[013-68]| |
90
|
|
|
|
|
|
|
7[124-8]| |
91
|
|
|
|
|
|
|
9[0-8] |
92
|
|
|
|
|
|
|
)| |
93
|
|
|
|
|
|
|
9(?: |
94
|
|
|
|
|
|
|
[0-24]\\d| |
95
|
|
|
|
|
|
|
3[02-46-9]| |
96
|
|
|
|
|
|
|
5[0-79]| |
97
|
|
|
|
|
|
|
60| |
98
|
|
|
|
|
|
|
7[0169]| |
99
|
|
|
|
|
|
|
8[57-9]| |
100
|
|
|
|
|
|
|
9[02-9] |
101
|
|
|
|
|
|
|
) |
102
|
|
|
|
|
|
|
) |
103
|
|
|
|
|
|
|
)\\d{4} |
104
|
|
|
|
|
|
|
|8[024]9[2-9]\\d{6})', |
105
|
|
|
|
|
|
|
'pager' => '', |
106
|
|
|
|
|
|
|
'personal_number' => ' |
107
|
|
|
|
|
|
|
52(?: |
108
|
|
|
|
|
|
|
3(?: |
109
|
|
|
|
|
|
|
[2-46-9][02-9]\\d| |
110
|
|
|
|
|
|
|
5(?: |
111
|
|
|
|
|
|
|
[02-46-9]\\d| |
112
|
|
|
|
|
|
|
5[0-46-9] |
113
|
|
|
|
|
|
|
) |
114
|
|
|
|
|
|
|
)| |
115
|
|
|
|
|
|
|
4(?: |
116
|
|
|
|
|
|
|
[2-478][02-9]\\d| |
117
|
|
|
|
|
|
|
5(?: |
118
|
|
|
|
|
|
|
[034]\\d| |
119
|
|
|
|
|
|
|
2[024-9]| |
120
|
|
|
|
|
|
|
5[0-46-9] |
121
|
|
|
|
|
|
|
)| |
122
|
|
|
|
|
|
|
6(?: |
123
|
|
|
|
|
|
|
0[1-9]| |
124
|
|
|
|
|
|
|
[2-9]\\d |
125
|
|
|
|
|
|
|
)| |
126
|
|
|
|
|
|
|
9(?: |
127
|
|
|
|
|
|
|
[05-9]\\d| |
128
|
|
|
|
|
|
|
2[0-5]| |
129
|
|
|
|
|
|
|
49 |
130
|
|
|
|
|
|
|
) |
131
|
|
|
|
|
|
|
) |
132
|
|
|
|
|
|
|
)\\d{4}| |
133
|
|
|
|
|
|
|
52[34][2-9]1[02-9]\\d{4}| |
134
|
|
|
|
|
|
|
5(?: |
135
|
|
|
|
|
|
|
00| |
136
|
|
|
|
|
|
|
2[125-9]| |
137
|
|
|
|
|
|
|
33| |
138
|
|
|
|
|
|
|
44| |
139
|
|
|
|
|
|
|
66| |
140
|
|
|
|
|
|
|
77| |
141
|
|
|
|
|
|
|
88 |
142
|
|
|
|
|
|
|
)[2-9]\\d{6} |
143
|
|
|
|
|
|
|
', |
144
|
|
|
|
|
|
|
'specialrate' => '(900[2-9]\\d{6})', |
145
|
|
|
|
|
|
|
'toll_free' => ' |
146
|
|
|
|
|
|
|
8(?: |
147
|
|
|
|
|
|
|
00(?: |
148
|
|
|
|
|
|
|
14| |
149
|
|
|
|
|
|
|
[2-9]\\d |
150
|
|
|
|
|
|
|
)| |
151
|
|
|
|
|
|
|
(?: |
152
|
|
|
|
|
|
|
33| |
153
|
|
|
|
|
|
|
44| |
154
|
|
|
|
|
|
|
55| |
155
|
|
|
|
|
|
|
66| |
156
|
|
|
|
|
|
|
77| |
157
|
|
|
|
|
|
|
88 |
158
|
|
|
|
|
|
|
)[2-9]\\d |
159
|
|
|
|
|
|
|
)\\d{5} |
160
|
|
|
|
|
|
|
', |
161
|
|
|
|
|
|
|
'voip' => '' |
162
|
|
|
|
|
|
|
}; |
163
|
2
|
|
|
2
|
|
350
|
use Number::Phone::NANP::Data; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
391
|
|
164
|
|
|
|
|
|
|
sub areaname { |
165
|
|
|
|
|
|
|
# uncoverable subroutine - no data for most NANP countries |
166
|
|
|
|
|
|
|
# uncoverable statement |
167
|
0
|
|
|
0
|
1
|
0
|
Number::Phone::NANP::Data::_areaname('1'.shift()->{number}); } |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
sub new { |
170
|
13
|
|
|
13
|
1
|
55
|
my $class = shift; |
171
|
13
|
|
|
|
|
30
|
my $number = shift; |
172
|
13
|
|
|
|
|
92
|
$number =~ s/(^\+1|\D)//g; |
173
|
13
|
|
|
|
|
87
|
my $self = bless({ country_code => '1', number => $number, formatters => $formatters, validators => $validators, }, $class); |
174
|
13
|
100
|
|
|
|
65
|
return $self->is_valid() ? $self : undef; |
175
|
|
|
|
|
|
|
} |
176
|
|
|
|
|
|
|
1; |