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