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