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