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