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::JM; |
20
|
2
|
|
|
2
|
|
1111
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
221
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
47
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
63
|
|
24
|
2
|
|
|
2
|
|
16
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
15
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131447; |
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
|
|
|
|
|
|
|
8766060\\d{3}| |
56
|
|
|
|
|
|
|
(?: |
57
|
|
|
|
|
|
|
658(?: |
58
|
|
|
|
|
|
|
2(?: |
59
|
|
|
|
|
|
|
[0-8]\\d| |
60
|
|
|
|
|
|
|
9[0-46-9] |
61
|
|
|
|
|
|
|
)| |
62
|
|
|
|
|
|
|
[3-9]\\d\\d |
63
|
|
|
|
|
|
|
)| |
64
|
|
|
|
|
|
|
876(?: |
65
|
|
|
|
|
|
|
52[35]| |
66
|
|
|
|
|
|
|
6(?: |
67
|
|
|
|
|
|
|
0[1-3579]| |
68
|
|
|
|
|
|
|
1[0235-9]| |
69
|
|
|
|
|
|
|
[23]\\d| |
70
|
|
|
|
|
|
|
40| |
71
|
|
|
|
|
|
|
5[06]| |
72
|
|
|
|
|
|
|
6[2-589]| |
73
|
|
|
|
|
|
|
7[0-25-9]| |
74
|
|
|
|
|
|
|
8[04]| |
75
|
|
|
|
|
|
|
9[4-9] |
76
|
|
|
|
|
|
|
)| |
77
|
|
|
|
|
|
|
7(?: |
78
|
|
|
|
|
|
|
0[2-689]| |
79
|
|
|
|
|
|
|
[1-6]\\d| |
80
|
|
|
|
|
|
|
8[056]| |
81
|
|
|
|
|
|
|
9[45] |
82
|
|
|
|
|
|
|
)| |
83
|
|
|
|
|
|
|
9(?: |
84
|
|
|
|
|
|
|
0[1-8]| |
85
|
|
|
|
|
|
|
1[02378]| |
86
|
|
|
|
|
|
|
[2-8]\\d| |
87
|
|
|
|
|
|
|
9[2-468] |
88
|
|
|
|
|
|
|
) |
89
|
|
|
|
|
|
|
) |
90
|
|
|
|
|
|
|
)\\d{4} |
91
|
|
|
|
|
|
|
| |
92
|
|
|
|
|
|
|
(?: |
93
|
|
|
|
|
|
|
658295| |
94
|
|
|
|
|
|
|
876(?: |
95
|
|
|
|
|
|
|
2(?: |
96
|
|
|
|
|
|
|
0[1-9]| |
97
|
|
|
|
|
|
|
[13-9]\\d| |
98
|
|
|
|
|
|
|
2[013-9] |
99
|
|
|
|
|
|
|
)| |
100
|
|
|
|
|
|
|
[348]\\d\\d| |
101
|
|
|
|
|
|
|
5(?: |
102
|
|
|
|
|
|
|
0[1-9]| |
103
|
|
|
|
|
|
|
[1-9]\\d |
104
|
|
|
|
|
|
|
)| |
105
|
|
|
|
|
|
|
6(?: |
106
|
|
|
|
|
|
|
4[89]| |
107
|
|
|
|
|
|
|
6[67] |
108
|
|
|
|
|
|
|
)| |
109
|
|
|
|
|
|
|
7(?: |
110
|
|
|
|
|
|
|
0[07]| |
111
|
|
|
|
|
|
|
7\\d| |
112
|
|
|
|
|
|
|
8[1-47-9]| |
113
|
|
|
|
|
|
|
9[0-36-9] |
114
|
|
|
|
|
|
|
)| |
115
|
|
|
|
|
|
|
9(?: |
116
|
|
|
|
|
|
|
[01]9| |
117
|
|
|
|
|
|
|
9[0579] |
118
|
|
|
|
|
|
|
) |
119
|
|
|
|
|
|
|
) |
120
|
|
|
|
|
|
|
)\\d{4} |
121
|
|
|
|
|
|
|
)', |
122
|
|
|
|
|
|
|
'pager' => '', |
123
|
|
|
|
|
|
|
'personal_number' => ' |
124
|
|
|
|
|
|
|
52(?: |
125
|
|
|
|
|
|
|
3(?: |
126
|
|
|
|
|
|
|
[2-46-9][02-9]\\d| |
127
|
|
|
|
|
|
|
5(?: |
128
|
|
|
|
|
|
|
[02-46-9]\\d| |
129
|
|
|
|
|
|
|
5[0-46-9] |
130
|
|
|
|
|
|
|
) |
131
|
|
|
|
|
|
|
)| |
132
|
|
|
|
|
|
|
4(?: |
133
|
|
|
|
|
|
|
[2-478][02-9]\\d| |
134
|
|
|
|
|
|
|
5(?: |
135
|
|
|
|
|
|
|
[034]\\d| |
136
|
|
|
|
|
|
|
2[024-9]| |
137
|
|
|
|
|
|
|
5[0-46-9] |
138
|
|
|
|
|
|
|
)| |
139
|
|
|
|
|
|
|
6(?: |
140
|
|
|
|
|
|
|
0[1-9]| |
141
|
|
|
|
|
|
|
[2-9]\\d |
142
|
|
|
|
|
|
|
)| |
143
|
|
|
|
|
|
|
9(?: |
144
|
|
|
|
|
|
|
[05-9]\\d| |
145
|
|
|
|
|
|
|
2[0-5]| |
146
|
|
|
|
|
|
|
49 |
147
|
|
|
|
|
|
|
) |
148
|
|
|
|
|
|
|
) |
149
|
|
|
|
|
|
|
)\\d{4}| |
150
|
|
|
|
|
|
|
52[34][2-9]1[02-9]\\d{4}| |
151
|
|
|
|
|
|
|
5(?: |
152
|
|
|
|
|
|
|
00| |
153
|
|
|
|
|
|
|
2[125-9]| |
154
|
|
|
|
|
|
|
33| |
155
|
|
|
|
|
|
|
44| |
156
|
|
|
|
|
|
|
66| |
157
|
|
|
|
|
|
|
77| |
158
|
|
|
|
|
|
|
88 |
159
|
|
|
|
|
|
|
)[2-9]\\d{6} |
160
|
|
|
|
|
|
|
', |
161
|
|
|
|
|
|
|
'specialrate' => '(900[2-9]\\d{6})', |
162
|
|
|
|
|
|
|
'toll_free' => ' |
163
|
|
|
|
|
|
|
8(?: |
164
|
|
|
|
|
|
|
00| |
165
|
|
|
|
|
|
|
33| |
166
|
|
|
|
|
|
|
44| |
167
|
|
|
|
|
|
|
55| |
168
|
|
|
|
|
|
|
66| |
169
|
|
|
|
|
|
|
77| |
170
|
|
|
|
|
|
|
88 |
171
|
|
|
|
|
|
|
)[2-9]\\d{6} |
172
|
|
|
|
|
|
|
', |
173
|
|
|
|
|
|
|
'voip' => '' |
174
|
|
|
|
|
|
|
}; |
175
|
2
|
|
|
2
|
|
391
|
use Number::Phone::NANP::Data; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
412
|
|
176
|
|
|
|
|
|
|
sub areaname { |
177
|
1
|
|
|
1
|
1
|
8
|
Number::Phone::NANP::Data::_areaname('1'.shift()->{number}); } |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
sub new { |
180
|
14
|
|
|
14
|
1
|
33
|
my $class = shift; |
181
|
14
|
|
|
|
|
26
|
my $number = shift; |
182
|
14
|
|
|
|
|
97
|
$number =~ s/(^\+1|\D)//g; |
183
|
14
|
|
|
|
|
103
|
my $self = bless({ country_code => '1', number => $number, formatters => $formatters, validators => $validators, }, $class); |
184
|
14
|
100
|
|
|
|
72
|
return $self->is_valid() ? $self : undef; |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
1; |