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