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