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