| 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::ML; |
|
20
|
2
|
|
|
2
|
|
1232
|
use base qw(Number::Phone::StubCountry); |
|
|
2
|
|
|
|
|
25
|
|
|
|
2
|
|
|
|
|
218
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
16
|
use strict; |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
41
|
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
47
|
|
|
24
|
2
|
|
|
2
|
|
15
|
use utf8; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
14
|
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
|
28
|
|
|
|
|
|
|
{ |
|
29
|
|
|
|
|
|
|
'format' => '$1', |
|
30
|
|
|
|
|
|
|
'intl_format' => 'NA', |
|
31
|
|
|
|
|
|
|
'leading_digits' => ' |
|
32
|
|
|
|
|
|
|
67(?: |
|
33
|
|
|
|
|
|
|
0[09]| |
|
34
|
|
|
|
|
|
|
[59]9| |
|
35
|
|
|
|
|
|
|
77| |
|
36
|
|
|
|
|
|
|
8[89] |
|
37
|
|
|
|
|
|
|
)| |
|
38
|
|
|
|
|
|
|
74(?: |
|
39
|
|
|
|
|
|
|
0[02]| |
|
40
|
|
|
|
|
|
|
44| |
|
41
|
|
|
|
|
|
|
55 |
|
42
|
|
|
|
|
|
|
) |
|
43
|
|
|
|
|
|
|
', |
|
44
|
|
|
|
|
|
|
'pattern' => '(\\d{4})' |
|
45
|
|
|
|
|
|
|
}, |
|
46
|
|
|
|
|
|
|
{ |
|
47
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
|
48
|
|
|
|
|
|
|
'leading_digits' => '[24-9]', |
|
49
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})' |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
]; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $validators = { |
|
54
|
|
|
|
|
|
|
'fixed_line' => ' |
|
55
|
|
|
|
|
|
|
2(?: |
|
56
|
|
|
|
|
|
|
07[0-8]| |
|
57
|
|
|
|
|
|
|
12[67] |
|
58
|
|
|
|
|
|
|
)\\d{4}| |
|
59
|
|
|
|
|
|
|
(?: |
|
60
|
|
|
|
|
|
|
2(?: |
|
61
|
|
|
|
|
|
|
02| |
|
62
|
|
|
|
|
|
|
1[4-689] |
|
63
|
|
|
|
|
|
|
)| |
|
64
|
|
|
|
|
|
|
4(?: |
|
65
|
|
|
|
|
|
|
0[0-4]| |
|
66
|
|
|
|
|
|
|
4[1-39] |
|
67
|
|
|
|
|
|
|
) |
|
68
|
|
|
|
|
|
|
)\\d{5} |
|
69
|
|
|
|
|
|
|
', |
|
70
|
|
|
|
|
|
|
'geographic' => ' |
|
71
|
|
|
|
|
|
|
2(?: |
|
72
|
|
|
|
|
|
|
07[0-8]| |
|
73
|
|
|
|
|
|
|
12[67] |
|
74
|
|
|
|
|
|
|
)\\d{4}| |
|
75
|
|
|
|
|
|
|
(?: |
|
76
|
|
|
|
|
|
|
2(?: |
|
77
|
|
|
|
|
|
|
02| |
|
78
|
|
|
|
|
|
|
1[4-689] |
|
79
|
|
|
|
|
|
|
)| |
|
80
|
|
|
|
|
|
|
4(?: |
|
81
|
|
|
|
|
|
|
0[0-4]| |
|
82
|
|
|
|
|
|
|
4[1-39] |
|
83
|
|
|
|
|
|
|
) |
|
84
|
|
|
|
|
|
|
)\\d{5} |
|
85
|
|
|
|
|
|
|
', |
|
86
|
|
|
|
|
|
|
'mobile' => ' |
|
87
|
|
|
|
|
|
|
2(?: |
|
88
|
|
|
|
|
|
|
0(?: |
|
89
|
|
|
|
|
|
|
01| |
|
90
|
|
|
|
|
|
|
79 |
|
91
|
|
|
|
|
|
|
)| |
|
92
|
|
|
|
|
|
|
17\\d |
|
93
|
|
|
|
|
|
|
)\\d{4}| |
|
94
|
|
|
|
|
|
|
(?: |
|
95
|
|
|
|
|
|
|
5[01]| |
|
96
|
|
|
|
|
|
|
[679]\\d| |
|
97
|
|
|
|
|
|
|
8[2-49] |
|
98
|
|
|
|
|
|
|
)\\d{6} |
|
99
|
|
|
|
|
|
|
', |
|
100
|
|
|
|
|
|
|
'pager' => '', |
|
101
|
|
|
|
|
|
|
'personal_number' => '', |
|
102
|
|
|
|
|
|
|
'specialrate' => '', |
|
103
|
|
|
|
|
|
|
'toll_free' => '80\\d{6}', |
|
104
|
|
|
|
|
|
|
'voip' => '' |
|
105
|
|
|
|
|
|
|
}; |
|
106
|
|
|
|
|
|
|
my %areanames = (); |
|
107
|
|
|
|
|
|
|
$areanames{en} = {"2232078", "Bamako", |
|
108
|
|
|
|
|
|
|
"223443", "Bamako", |
|
109
|
|
|
|
|
|
|
"223202", "Bamako", |
|
110
|
|
|
|
|
|
|
"2232075", "Bamako", |
|
111
|
|
|
|
|
|
|
"2232076", "Bamako", |
|
112
|
|
|
|
|
|
|
"223212", "Koulikoro", |
|
113
|
|
|
|
|
|
|
"223214", "Mopti", |
|
114
|
|
|
|
|
|
|
"2232074", "Bamako", |
|
115
|
|
|
|
|
|
|
"223449", "Bamako", |
|
116
|
|
|
|
|
|
|
"2232077", "Bamako", |
|
117
|
|
|
|
|
|
|
"223215", "Kayes", |
|
118
|
|
|
|
|
|
|
"2232072", "Bamako", |
|
119
|
|
|
|
|
|
|
"2232070", "Bamako", |
|
120
|
|
|
|
|
|
|
"223442", "Bamako", |
|
121
|
|
|
|
|
|
|
"2232071", "Bamako", |
|
122
|
|
|
|
|
|
|
"223216", "Sikasso", |
|
123
|
|
|
|
|
|
|
"2232073", "Bamako", |
|
124
|
|
|
|
|
|
|
"223218", "Gao\/Kidal", |
|
125
|
|
|
|
|
|
|
"223219", "Tombouctou",}; |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub new { |
|
128
|
10
|
|
|
10
|
1
|
39
|
my $class = shift; |
|
129
|
10
|
|
|
|
|
18
|
my $number = shift; |
|
130
|
10
|
|
|
|
|
75
|
$number =~ s/(^\+223|\D)//g; |
|
131
|
10
|
|
|
|
|
53
|
my $self = bless({ country_code => '223', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
|
132
|
10
|
100
|
|
|
|
54
|
return $self->is_valid() ? $self : undef; |
|
133
|
|
|
|
|
|
|
} |
|
134
|
|
|
|
|
|
|
1; |