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