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