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::SX; |
20
|
2
|
|
|
2
|
|
1077
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
221
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
19
|
use strict; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
49
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
19
|
|
|
2
|
|
|
|
|
64
|
|
24
|
2
|
|
|
2
|
|
34
|
use utf8; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
16
|
|
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
|
|
|
|
|
|
|
7215(?: |
56
|
|
|
|
|
|
|
4[2-8]| |
57
|
|
|
|
|
|
|
8[239]| |
58
|
|
|
|
|
|
|
9[056] |
59
|
|
|
|
|
|
|
)\\d{4} |
60
|
|
|
|
|
|
|
', |
61
|
|
|
|
|
|
|
'geographic' => ' |
62
|
|
|
|
|
|
|
7215(?: |
63
|
|
|
|
|
|
|
4[2-8]| |
64
|
|
|
|
|
|
|
8[239]| |
65
|
|
|
|
|
|
|
9[056] |
66
|
|
|
|
|
|
|
)\\d{4} |
67
|
|
|
|
|
|
|
', |
68
|
|
|
|
|
|
|
'mobile' => ' |
69
|
|
|
|
|
|
|
7215(?: |
70
|
|
|
|
|
|
|
1[02]| |
71
|
|
|
|
|
|
|
2\\d| |
72
|
|
|
|
|
|
|
5[034679]| |
73
|
|
|
|
|
|
|
8[014-8] |
74
|
|
|
|
|
|
|
)\\d{4} |
75
|
|
|
|
|
|
|
', |
76
|
|
|
|
|
|
|
'pager' => '', |
77
|
|
|
|
|
|
|
'personal_number' => ' |
78
|
|
|
|
|
|
|
52(?: |
79
|
|
|
|
|
|
|
3(?: |
80
|
|
|
|
|
|
|
[2-46-9][02-9]\\d| |
81
|
|
|
|
|
|
|
5(?: |
82
|
|
|
|
|
|
|
[02-46-9]\\d| |
83
|
|
|
|
|
|
|
5[0-46-9] |
84
|
|
|
|
|
|
|
) |
85
|
|
|
|
|
|
|
)| |
86
|
|
|
|
|
|
|
4(?: |
87
|
|
|
|
|
|
|
[2-478][02-9]\\d| |
88
|
|
|
|
|
|
|
5(?: |
89
|
|
|
|
|
|
|
[034]\\d| |
90
|
|
|
|
|
|
|
2[024-9]| |
91
|
|
|
|
|
|
|
5[0-46-9] |
92
|
|
|
|
|
|
|
)| |
93
|
|
|
|
|
|
|
6(?: |
94
|
|
|
|
|
|
|
0[1-9]| |
95
|
|
|
|
|
|
|
[2-9]\\d |
96
|
|
|
|
|
|
|
)| |
97
|
|
|
|
|
|
|
9(?: |
98
|
|
|
|
|
|
|
[05-9]\\d| |
99
|
|
|
|
|
|
|
2[0-5]| |
100
|
|
|
|
|
|
|
49 |
101
|
|
|
|
|
|
|
) |
102
|
|
|
|
|
|
|
) |
103
|
|
|
|
|
|
|
)\\d{4}| |
104
|
|
|
|
|
|
|
52[34][2-9]1[02-9]\\d{4}| |
105
|
|
|
|
|
|
|
5(?: |
106
|
|
|
|
|
|
|
00| |
107
|
|
|
|
|
|
|
2[125-9]| |
108
|
|
|
|
|
|
|
33| |
109
|
|
|
|
|
|
|
44| |
110
|
|
|
|
|
|
|
66| |
111
|
|
|
|
|
|
|
77| |
112
|
|
|
|
|
|
|
88 |
113
|
|
|
|
|
|
|
)[2-9]\\d{6} |
114
|
|
|
|
|
|
|
', |
115
|
|
|
|
|
|
|
'specialrate' => '(900[2-9]\\d{6})', |
116
|
|
|
|
|
|
|
'toll_free' => ' |
117
|
|
|
|
|
|
|
8(?: |
118
|
|
|
|
|
|
|
00| |
119
|
|
|
|
|
|
|
33| |
120
|
|
|
|
|
|
|
44| |
121
|
|
|
|
|
|
|
55| |
122
|
|
|
|
|
|
|
66| |
123
|
|
|
|
|
|
|
77| |
124
|
|
|
|
|
|
|
88 |
125
|
|
|
|
|
|
|
)[2-9]\\d{6} |
126
|
|
|
|
|
|
|
', |
127
|
|
|
|
|
|
|
'voip' => '' |
128
|
|
|
|
|
|
|
}; |
129
|
2
|
|
|
2
|
|
284
|
use Number::Phone::NANP::Data; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
347
|
|
130
|
|
|
|
|
|
|
sub areaname { |
131
|
|
|
|
|
|
|
# uncoverable subroutine - no data for most NANP countries |
132
|
|
|
|
|
|
|
# uncoverable statement |
133
|
0
|
|
|
0
|
1
|
0
|
Number::Phone::NANP::Data::_areaname('1'.shift()->{number}); } |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub new { |
136
|
13
|
|
|
13
|
1
|
30
|
my $class = shift; |
137
|
13
|
|
|
|
|
54
|
my $number = shift; |
138
|
13
|
|
|
|
|
92
|
$number =~ s/(^\+1|\D)//g; |
139
|
13
|
|
|
|
|
70
|
my $self = bless({ country_code => '1', number => $number, formatters => $formatters, validators => $validators, }, $class); |
140
|
13
|
100
|
|
|
|
84
|
return $self->is_valid() ? $self : undef; |
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
1; |