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
|
|
1291
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
254
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
26
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
52
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
57
|
|
24
|
2
|
|
|
2
|
|
14
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
14
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174404; |
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} = {"223216", "Sikasso", |
108
|
|
|
|
|
|
|
"2232075", "Bamako", |
109
|
|
|
|
|
|
|
"223218", "Gao\/Kidal", |
110
|
|
|
|
|
|
|
"2232073", "Bamako", |
111
|
|
|
|
|
|
|
"223202", "Bamako", |
112
|
|
|
|
|
|
|
"2232070", "Bamako", |
113
|
|
|
|
|
|
|
"2232071", "Bamako", |
114
|
|
|
|
|
|
|
"2232072", "Bamako", |
115
|
|
|
|
|
|
|
"223449", "Bamako", |
116
|
|
|
|
|
|
|
"223212", "Koulikoro", |
117
|
|
|
|
|
|
|
"2232076", "Bamako", |
118
|
|
|
|
|
|
|
"2232074", "Bamako", |
119
|
|
|
|
|
|
|
"2232078", "Bamako", |
120
|
|
|
|
|
|
|
"223442", "Bamako", |
121
|
|
|
|
|
|
|
"223214", "Mopti", |
122
|
|
|
|
|
|
|
"223215", "Kayes", |
123
|
|
|
|
|
|
|
"223219", "Tombouctou", |
124
|
|
|
|
|
|
|
"223443", "Bamako", |
125
|
|
|
|
|
|
|
"2232077", "Bamako",}; |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub new { |
128
|
10
|
|
|
10
|
1
|
36
|
my $class = shift; |
129
|
10
|
|
|
|
|
20
|
my $number = shift; |
130
|
10
|
|
|
|
|
68
|
$number =~ s/(^\+223|\D)//g; |
131
|
10
|
|
|
|
|
61
|
my $self = bless({ country_code => '223', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
132
|
10
|
100
|
|
|
|
57
|
return $self->is_valid() ? $self : undef; |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
1; |