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

filter: Statementstmt 100% 25 / 25 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 33 / 33 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/CG.pm ↑ Summary blib/lib/Number/Phone/StubCountry/CK.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::CI;
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' => '2',
31 'pattern' => '(\\d{2})(\\d{2})(\\d)(\\d{5})'
32 },
33 {
34 'format' => '$1 $2 $3 $4',
35 'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{4})'
36 }
37 ];
38  
39 2 my $validators = {
40 'fixed_line' => '
41 2(?:
42 [15]\\d{3}|
43 7(?:
44 2(?:
45 0[23]|
46 1[2357]|
47 2[245]|
48 3[45]|
49 4[3-5]
50 )|
51 3(?:
52 06|
53 1[69]|
54 [2-6]7
55 )
56 )
57 )\\d{5}
58 ',
59 'geographic' => '
60 2(?:
61 [15]\\d{3}|
62 7(?:
63 2(?:
64 0[23]|
65 1[2357]|
66 2[245]|
67 3[45]|
68 4[3-5]
69 )|
70 3(?:
71 06|
72 1[69]|
73 [2-6]7
74 )
75 )
76 )\\d{5}
77 ',
78 'mobile' => '0[157]\\d{8}',
79 'pager' => '',
80 'personal_number' => '',
81 'specialrate' => '',
82 'toll_free' => '',
83 'voip' => ''
84 };
85 2 my %areanames = ();
86 2 $areanames{en} = {"2252721", "Abidjan\-sud",
87 "22527225", "Cocody\,\ Abidjan",
88 "2252133", "Man",
89 "2252534", "San\-Pédro",
90 "2252733", "Man",
91 "2252520", "Plateau\,\ Abidjan",
92 "2252522", "Cocody\,\ Abidjan",
93 "2252121", "Abidjan\-sud",
94 "22527224", "Cocody\,\ Abidjan",
95 "2252536", "Korhogo",
96 "2252132", "Daloa",
97 "2252130", "Yamoussoukro",
98 "2252124", "Abobo\,\ Abidjan",
99 "2252531", "Bouaké",
100 "2252535", "Abengourou",
101 "2252523", "Banco\,\ Abidjan",
102 "2252732", "Daloa",
103 "2252730", "Yamoussoukro",
104 "2252724", "Abobo\,\ Abidjan",
105 "2252736", "Korhogo",
106 "2252533", "Man",
107 "2252720", "Plateau\,\ Abidjan",
108 "2252734", "San\-Pédro",
109 "2252122", "Cocody\,\ Abidjan",
110 "2252120", "Plateau\,\ Abidjan",
111 "2252134", "San\-Pédro",
112 "2252136", "Korhogo",
113 "2252521", "Abidjan\-sud",
114 "2252524", "Abobo\,\ Abidjan",
115 "2252530", "Yamoussoukro",
116 "2252723", "Banco\,\ Abidjan",
117 "2252532", "Daloa",
118 "2252735", "Abengourou",
119 "2252131", "Bouaké",
120 "2252135", "Abengourou",
121 "2252731", "Bouaké",
122 "22527222", "Abidjan\-sud",
123 "2252123", "Banco\,\ Abidjan",};
124 2 $areanames{fr} = {};
125 2 my $timezones = {
126 '' => [
127 'Africa/Abidjan'
128 ]
129 };
130  
131 7 ▶ sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
132 7 my $class = shift;
133 7 my $number = shift;
134 7 $number =~ s/(^\+225|\D)//g;
135 7 my $self = bless({ country_code => '225', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
136 7 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 6 1 7
137 }
138 2 1;
« blib/lib/Number/Phone/StubCountry/CG.pm ↑ Summary blib/lib/Number/Phone/StubCountry/CK.pm »