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