blib/lib/Number/Phone/StubCountry/CM.pm

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