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