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::CM; |
20
|
2
|
|
|
2
|
|
1194
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
246
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
52
|
|
23
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
51
|
|
24
|
2
|
|
|
2
|
|
12
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
16
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174401; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
30
|
|
|
|
|
|
|
'leading_digits' => '88', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})' |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4 $5', |
35
|
|
|
|
|
|
|
'leading_digits' => ' |
36
|
|
|
|
|
|
|
[26]| |
37
|
|
|
|
|
|
|
88 |
38
|
|
|
|
|
|
|
', |
39
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})' |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
]; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $validators = { |
44
|
|
|
|
|
|
|
'fixed_line' => ' |
45
|
|
|
|
|
|
|
2(?: |
46
|
|
|
|
|
|
|
22| |
47
|
|
|
|
|
|
|
33 |
48
|
|
|
|
|
|
|
)\\d{6} |
49
|
|
|
|
|
|
|
', |
50
|
|
|
|
|
|
|
'geographic' => ' |
51
|
|
|
|
|
|
|
2(?: |
52
|
|
|
|
|
|
|
22| |
53
|
|
|
|
|
|
|
33 |
54
|
|
|
|
|
|
|
)\\d{6} |
55
|
|
|
|
|
|
|
', |
56
|
|
|
|
|
|
|
'mobile' => ' |
57
|
|
|
|
|
|
|
(?: |
58
|
|
|
|
|
|
|
24[23]| |
59
|
|
|
|
|
|
|
6[25-9]\\d |
60
|
|
|
|
|
|
|
)\\d{6} |
61
|
|
|
|
|
|
|
', |
62
|
|
|
|
|
|
|
'pager' => '', |
63
|
|
|
|
|
|
|
'personal_number' => '', |
64
|
|
|
|
|
|
|
'specialrate' => '', |
65
|
|
|
|
|
|
|
'toll_free' => '88\\d{6,7}', |
66
|
|
|
|
|
|
|
'voip' => '' |
67
|
|
|
|
|
|
|
}; |
68
|
|
|
|
|
|
|
my %areanames = (); |
69
|
|
|
|
|
|
|
$areanames{en} = {"23722220", "Jamot", |
70
|
|
|
|
|
|
|
"237222264", "Belabo", |
71
|
|
|
|
|
|
|
"237233332", "Limbé", |
72
|
|
|
|
|
|
|
"237222355", "Tignère", |
73
|
|
|
|
|
|
|
"237222395", "Guider", |
74
|
|
|
|
|
|
|
"237233452", "Dschang", |
75
|
|
|
|
|
|
|
"237233492", "Nkongsamba", |
76
|
|
|
|
|
|
|
"237233341", "Manfé", |
77
|
|
|
|
|
|
|
"23722221", "Jamot", |
78
|
|
|
|
|
|
|
"237233221", "Kumbo", |
79
|
|
|
|
|
|
|
"237222354", "Galim\ Tignère", |
80
|
|
|
|
|
|
|
"23723347", "Akwa\ North", |
81
|
|
|
|
|
|
|
"237222479", "Meyomessala\/Efoulan", |
82
|
|
|
|
|
|
|
"237222478", "Sangmelima", |
83
|
|
|
|
|
|
|
"237233325", "Buéa", |
84
|
|
|
|
|
|
|
"23722230", "Nkomo", |
85
|
|
|
|
|
|
|
"237222284", "Ebolowa", |
86
|
|
|
|
|
|
|
"237222371", "Meiganga", |
87
|
|
|
|
|
|
|
"237222250", "N\'Gaoundéré", |
88
|
|
|
|
|
|
|
"237233333", "Limbé", |
89
|
|
|
|
|
|
|
"237222251", "N\'Gaoundéré", |
90
|
|
|
|
|
|
|
"237233493", "Nkongsamba", |
91
|
|
|
|
|
|
|
"237233324", "Buéa", |
92
|
|
|
|
|
|
|
"237222254", "Dang", |
93
|
|
|
|
|
|
|
"237233321", "Muyuka", |
94
|
|
|
|
|
|
|
"23722231", "Biyem\ Assi", |
95
|
|
|
|
|
|
|
"23723343", "Akwa\ Centre", |
96
|
|
|
|
|
|
|
"23723339", "Bonabéri", |
97
|
|
|
|
|
|
|
"237233362", "Bamenda", |
98
|
|
|
|
|
|
|
"23722222", "Yaounde", |
99
|
|
|
|
|
|
|
"237233205", "Wum", |
100
|
|
|
|
|
|
|
"237222397", "Figuil", |
101
|
|
|
|
|
|
|
"237222369", "Banyo", |
102
|
|
|
|
|
|
|
"237222464", "Lolodorf", |
103
|
|
|
|
|
|
|
"237222136", "Eséka\/Mboumnyebel", |
104
|
|
|
|
|
|
|
"237233263", "Foumban", |
105
|
|
|
|
|
|
|
"237222461", "Kribi", |
106
|
|
|
|
|
|
|
"237233329", "Buéa", |
107
|
|
|
|
|
|
|
"237233328", "Buéa", |
108
|
|
|
|
|
|
|
"237222322", "Soa", |
109
|
|
|
|
|
|
|
"237233215", "Nkambe", |
110
|
|
|
|
|
|
|
"237222242", "Bertoua", |
111
|
|
|
|
|
|
|
"237233326", "Buéa", |
112
|
|
|
|
|
|
|
"237233305", "Mbouda", |
113
|
|
|
|
|
|
|
"237222180", "Obala", |
114
|
|
|
|
|
|
|
"237222256", "Beelel\/Mbé", |
115
|
|
|
|
|
|
|
"237233262", "Foumban", |
116
|
|
|
|
|
|
|
"237233327", "Buéa", |
117
|
|
|
|
|
|
|
"237222195", "Nanga\ Eboko", |
118
|
|
|
|
|
|
|
"23723337", "Bassa", |
119
|
|
|
|
|
|
|
"237222335", "Abong\-Bang", |
120
|
|
|
|
|
|
|
"237222455", "Mokolo", |
121
|
|
|
|
|
|
|
"237233363", "Bamenda", |
122
|
|
|
|
|
|
|
"237222185", "Bafia", |
123
|
|
|
|
|
|
|
"237222111", "Mbalmayo", |
124
|
|
|
|
|
|
|
"237222182", "Monatélé", |
125
|
|
|
|
|
|
|
"237233339", "Limbé", |
126
|
|
|
|
|
|
|
"237222463", "Lolodorf", |
127
|
|
|
|
|
|
|
"237233338", "Limbé", |
128
|
|
|
|
|
|
|
"237233355", "Kumba", |
129
|
|
|
|
|
|
|
"237222426", "Yagoua", |
130
|
|
|
|
|
|
|
"23723342", "Akwa\ Centre", |
131
|
|
|
|
|
|
|
"237233489", "Bangangté", |
132
|
|
|
|
|
|
|
"237222414", "Kousseri", |
133
|
|
|
|
|
|
|
"237222482", "Kye\-Ossie\/Ambam", |
134
|
|
|
|
|
|
|
"23722223", "Yaounde", |
135
|
|
|
|
|
|
|
"237233354", "Kumba", |
136
|
|
|
|
|
|
|
"237233364", "Bamenda", |
137
|
|
|
|
|
|
|
"237233361", "Bamenda", |
138
|
|
|
|
|
|
|
"237233360", "Bamenda", |
139
|
|
|
|
|
|
|
"237222241", "Bertoua", |
140
|
|
|
|
|
|
|
"237222321", "Mfou", |
141
|
|
|
|
|
|
|
"237233336", "Limbé", |
142
|
|
|
|
|
|
|
"237233337", "Limbé", |
143
|
|
|
|
|
|
|
"237222447", "Mora", |
144
|
|
|
|
|
|
|
"237222462", "Kribi", |
145
|
|
|
|
|
|
|
"237233496", "Nkongsamba", |
146
|
|
|
|
|
|
|
"23723344", "Bafoussam", |
147
|
|
|
|
|
|
|
"237233313", "Yabassi", |
148
|
|
|
|
|
|
|
"237233497", "Loum\/Mbanga", |
149
|
|
|
|
|
|
|
"237222347", "N\'Gaoundal", |
150
|
|
|
|
|
|
|
"237222282", "Mengong", |
151
|
|
|
|
|
|
|
"237233277", "Bandjoun", |
152
|
|
|
|
|
|
|
"23723341", "Bepanda", |
153
|
|
|
|
|
|
|
"23722227", "Garoua", |
154
|
|
|
|
|
|
|
"237233267", "Foumbot", |
155
|
|
|
|
|
|
|
"237233322", "Buéa", |
156
|
|
|
|
|
|
|
"237222120", "Akonolinga", |
157
|
|
|
|
|
|
|
"237222252", "N\'Gaoundéré", |
158
|
|
|
|
|
|
|
"237222121", "Ayos", |
159
|
|
|
|
|
|
|
"23723340", "Bepanda", |
160
|
|
|
|
|
|
|
"237233464", "Edéa", |
161
|
|
|
|
|
|
|
"237233494", "Nkongsamba", |
162
|
|
|
|
|
|
|
"237233323", "Buéa", |
163
|
|
|
|
|
|
|
"237233491", "Nkongsamba", |
164
|
|
|
|
|
|
|
"237222253", "N\'Gaoundéré", |
165
|
|
|
|
|
|
|
"237233451", "Dschang", |
166
|
|
|
|
|
|
|
"23722229", "Maroua", |
167
|
|
|
|
|
|
|
"237233296", "Bafang", |
168
|
|
|
|
|
|
|
"237222262", "Batouri", |
169
|
|
|
|
|
|
|
"237233334", "Limbé", |
170
|
|
|
|
|
|
|
"237233297", "Bafang", |
171
|
|
|
|
|
|
|
"237233490", "Nkongsamba", |
172
|
|
|
|
|
|
|
"237233331", "Tiko", |
173
|
|
|
|
|
|
|
"237233484", "Bangangté", |
174
|
|
|
|
|
|
|
"237233495", "Nkongsamba", |
175
|
|
|
|
|
|
|
"237222283", "Ebolowa", |
176
|
|
|
|
|
|
|
"237222144", "Ngoumou", |
177
|
|
|
|
|
|
|
"237222348", "Tibati", |
178
|
|
|
|
|
|
|
"237233366", "Mbambili", |
179
|
|
|
|
|
|
|
"237233335", "Limbé",}; |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
sub new { |
182
|
10
|
|
|
10
|
1
|
21
|
my $class = shift; |
183
|
10
|
|
|
|
|
18
|
my $number = shift; |
184
|
10
|
|
|
|
|
61
|
$number =~ s/(^\+237|\D)//g; |
185
|
10
|
|
|
|
|
65
|
my $self = bless({ country_code => '237', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
186
|
10
|
100
|
|
|
|
51
|
return $self->is_valid() ? $self : undef; |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
1; |