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