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::CI; |
20
|
2
|
|
|
2
|
|
1248
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
237
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
51
|
|
23
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
54
|
|
24
|
2
|
|
|
2
|
|
15
|
use utf8; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
16
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181417; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
my %areanames = (); |
86
|
|
|
|
|
|
|
$areanames{en} = {"2252734", "San\-Pédro", |
87
|
|
|
|
|
|
|
"2252724", "Abobo\,\ Abidjan", |
88
|
|
|
|
|
|
|
"2252736", "Korhogo", |
89
|
|
|
|
|
|
|
"2252720", "Plateau\,\ Abidjan", |
90
|
|
|
|
|
|
|
"2252733", "Man", |
91
|
|
|
|
|
|
|
"22527222", "Abidjan\-sud", |
92
|
|
|
|
|
|
|
"2252723", "Banco\,\ Abidjan", |
93
|
|
|
|
|
|
|
"2252730", "Yamoussoukro", |
94
|
|
|
|
|
|
|
"2252134", "San\-Pédro", |
95
|
|
|
|
|
|
|
"2252534", "San\-Pédro", |
96
|
|
|
|
|
|
|
"2252124", "Abobo\,\ Abidjan", |
97
|
|
|
|
|
|
|
"2252524", "Abobo\,\ Abidjan", |
98
|
|
|
|
|
|
|
"2252133", "Man", |
99
|
|
|
|
|
|
|
"2252536", "Korhogo", |
100
|
|
|
|
|
|
|
"2252120", "Plateau\,\ Abidjan", |
101
|
|
|
|
|
|
|
"2252533", "Man", |
102
|
|
|
|
|
|
|
"2252136", "Korhogo", |
103
|
|
|
|
|
|
|
"2252520", "Plateau\,\ Abidjan", |
104
|
|
|
|
|
|
|
"2252130", "Yamoussoukro", |
105
|
|
|
|
|
|
|
"2252123", "Banco\,\ Abidjan", |
106
|
|
|
|
|
|
|
"2252523", "Banco\,\ Abidjan", |
107
|
|
|
|
|
|
|
"2252530", "Yamoussoukro", |
108
|
|
|
|
|
|
|
"2252131", "Bouaké", |
109
|
|
|
|
|
|
|
"2252735", "Abengourou", |
110
|
|
|
|
|
|
|
"2252531", "Bouaké", |
111
|
|
|
|
|
|
|
"2252121", "Abidjan\-sud", |
112
|
|
|
|
|
|
|
"2252521", "Abidjan\-sud", |
113
|
|
|
|
|
|
|
"22527225", "Cocody\,\ Abidjan", |
114
|
|
|
|
|
|
|
"2252132", "Daloa", |
115
|
|
|
|
|
|
|
"2252532", "Daloa", |
116
|
|
|
|
|
|
|
"2252122", "Cocody\,\ Abidjan", |
117
|
|
|
|
|
|
|
"2252522", "Cocody\,\ Abidjan", |
118
|
|
|
|
|
|
|
"2252535", "Abengourou", |
119
|
|
|
|
|
|
|
"22527224", "Cocody\,\ Abidjan", |
120
|
|
|
|
|
|
|
"2252731", "Bouaké", |
121
|
|
|
|
|
|
|
"2252135", "Abengourou", |
122
|
|
|
|
|
|
|
"2252721", "Abidjan\-sud", |
123
|
|
|
|
|
|
|
"2252732", "Daloa",}; |
124
|
|
|
|
|
|
|
$areanames{fr} = {}; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
sub new { |
127
|
7
|
|
|
7
|
1
|
33
|
my $class = shift; |
128
|
7
|
|
|
|
|
19
|
my $number = shift; |
129
|
7
|
|
|
|
|
43
|
$number =~ s/(^\+225|\D)//g; |
130
|
7
|
|
|
|
|
51
|
my $self = bless({ country_code => '225', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
131
|
7
|
100
|
|
|
|
34
|
return $self->is_valid() ? $self : undef; |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
1; |