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::AO; |
20
|
2
|
|
|
2
|
|
1220
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
290
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
47
|
|
23
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
52
|
|
24
|
2
|
|
|
2
|
|
11
|
use utf8; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181416; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
30
|
|
|
|
|
|
|
'leading_digits' => '[29]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{3})' |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
]; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $validators = { |
36
|
|
|
|
|
|
|
'fixed_line' => ' |
37
|
|
|
|
|
|
|
2\\d(?: |
38
|
|
|
|
|
|
|
[0134][25-9]| |
39
|
|
|
|
|
|
|
[25-9]\\d |
40
|
|
|
|
|
|
|
)\\d{5} |
41
|
|
|
|
|
|
|
', |
42
|
|
|
|
|
|
|
'geographic' => ' |
43
|
|
|
|
|
|
|
2\\d(?: |
44
|
|
|
|
|
|
|
[0134][25-9]| |
45
|
|
|
|
|
|
|
[25-9]\\d |
46
|
|
|
|
|
|
|
)\\d{5} |
47
|
|
|
|
|
|
|
', |
48
|
|
|
|
|
|
|
'mobile' => '9[1-59]\\d{7}', |
49
|
|
|
|
|
|
|
'pager' => '', |
50
|
|
|
|
|
|
|
'personal_number' => '', |
51
|
|
|
|
|
|
|
'specialrate' => '', |
52
|
|
|
|
|
|
|
'toll_free' => '', |
53
|
|
|
|
|
|
|
'voip' => '' |
54
|
|
|
|
|
|
|
}; |
55
|
|
|
|
|
|
|
my %areanames = (); |
56
|
|
|
|
|
|
|
$areanames{pt} = {"2442536", "Lunda\-Sul", |
57
|
|
|
|
|
|
|
"2442615", "Huíla", |
58
|
|
|
|
|
|
|
"2442652", "Curoca", |
59
|
|
|
|
|
|
|
"244252", "Lunda\-Norte", |
60
|
|
|
|
|
|
|
"2442617", "Huíla", |
61
|
|
|
|
|
|
|
"2442618", "Huíla", |
62
|
|
|
|
|
|
|
"2442532", "Lunda\-Sul", |
63
|
|
|
|
|
|
|
"244235", "Kwanza\-Norte", |
64
|
|
|
|
|
|
|
"2442539", "Lunda\-Sul", |
65
|
|
|
|
|
|
|
"244236", "Kwanza\-Sul", |
66
|
|
|
|
|
|
|
"2442538", "Lunda\-Sul", |
67
|
|
|
|
|
|
|
"244251", "Malanje", |
68
|
|
|
|
|
|
|
"2442728", "Baía\ Farta", |
69
|
|
|
|
|
|
|
"2442619", "Huíla", |
70
|
|
|
|
|
|
|
"2442616", "Huíla", |
71
|
|
|
|
|
|
|
"244248", "Bié", |
72
|
|
|
|
|
|
|
"2442537", "Lunda\-Sul", |
73
|
|
|
|
|
|
|
"244249", "Cuando\-Cubango", |
74
|
|
|
|
|
|
|
"244233", "Uíge",}; |
75
|
|
|
|
|
|
|
$areanames{en} = {"2442345", "Bengo", |
76
|
|
|
|
|
|
|
"2442729", "Catumbela", |
77
|
|
|
|
|
|
|
"2442618", "Huila", |
78
|
|
|
|
|
|
|
"2442722", "Lobito", |
79
|
|
|
|
|
|
|
"2442548", "Moxico", |
80
|
|
|
|
|
|
|
"2442358", "N\'Dalatando", |
81
|
|
|
|
|
|
|
"2442532", "Lunda\ Sul", |
82
|
|
|
|
|
|
|
"244235", "Cuanza\ Norte", |
83
|
|
|
|
|
|
|
"2442539", "Lunda\ Sul", |
84
|
|
|
|
|
|
|
"244241", "Huambo", |
85
|
|
|
|
|
|
|
"2442347", "Bengo", |
86
|
|
|
|
|
|
|
"244232", "Zaire", |
87
|
|
|
|
|
|
|
"2442615", "Huila", |
88
|
|
|
|
|
|
|
"2442536", "Lunda\ Sul", |
89
|
|
|
|
|
|
|
"2442348", "Caxito", |
90
|
|
|
|
|
|
|
"2442364", "Porto\ Amboim", |
91
|
|
|
|
|
|
|
"2442547", "Moxico", |
92
|
|
|
|
|
|
|
"244252", "Lunda\ Norte", |
93
|
|
|
|
|
|
|
"2442652", "Kuroka", |
94
|
|
|
|
|
|
|
"2442545", "Moxico", |
95
|
|
|
|
|
|
|
"2442726", "Bela\ Vista", |
96
|
|
|
|
|
|
|
"2442617", "Huila", |
97
|
|
|
|
|
|
|
"24422", "Luanda", |
98
|
|
|
|
|
|
|
"244231", "Cabinda", |
99
|
|
|
|
|
|
|
"2442777", "Dama\ Universal", |
100
|
|
|
|
|
|
|
"2442616", "Huila", |
101
|
|
|
|
|
|
|
"2442535", "Saurimo", |
102
|
|
|
|
|
|
|
"244248", "Bie", |
103
|
|
|
|
|
|
|
"2442537", "Lunda\ Sul", |
104
|
|
|
|
|
|
|
"244249", "Cuando\ Cubango", |
105
|
|
|
|
|
|
|
"244265", "Cunene", |
106
|
|
|
|
|
|
|
"2442498", "Menongue", |
107
|
|
|
|
|
|
|
"244233", "Uige", |
108
|
|
|
|
|
|
|
"2442342", "Bengo", |
109
|
|
|
|
|
|
|
"2442546", "Luena", |
110
|
|
|
|
|
|
|
"2442349", "Bengo", |
111
|
|
|
|
|
|
|
"244264", "Namibe", |
112
|
|
|
|
|
|
|
"244236", "Cuanza\ Sul", |
113
|
|
|
|
|
|
|
"2442526", "Dundo", |
114
|
|
|
|
|
|
|
"2442346", "Bengo", |
115
|
|
|
|
|
|
|
"2442538", "Lunda\ Sul", |
116
|
|
|
|
|
|
|
"2442542", "Moxico", |
117
|
|
|
|
|
|
|
"2442524", "Lucapa", |
118
|
|
|
|
|
|
|
"2442485", "Kuito", |
119
|
|
|
|
|
|
|
"2442549", "Moxico", |
120
|
|
|
|
|
|
|
"2442363", "Sumbe", |
121
|
|
|
|
|
|
|
"2442321", "Soyo", |
122
|
|
|
|
|
|
|
"2442655", "Ondjiva", |
123
|
|
|
|
|
|
|
"244251", "Malange", |
124
|
|
|
|
|
|
|
"2442612", "Lubango", |
125
|
|
|
|
|
|
|
"2442728", "Baia\ Farta", |
126
|
|
|
|
|
|
|
"244272", "Benguela", |
127
|
|
|
|
|
|
|
"2442619", "Huila",}; |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
sub new { |
130
|
7
|
|
|
7
|
1
|
21
|
my $class = shift; |
131
|
7
|
|
|
|
|
12
|
my $number = shift; |
132
|
7
|
|
|
|
|
42
|
$number =~ s/(^\+244|\D)//g; |
133
|
7
|
|
|
|
|
36
|
my $self = bless({ country_code => '244', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
134
|
7
|
100
|
|
|
|
28
|
return $self->is_valid() ? $self : undef; |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
1; |