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::MU; |
20
|
2
|
|
|
2
|
|
1166
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
234
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
68
|
|
23
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
51
|
|
24
|
2
|
|
|
2
|
|
14
|
use utf8; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
12
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181421; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
[2-46]| |
32
|
|
|
|
|
|
|
8[013] |
33
|
|
|
|
|
|
|
', |
34
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
{ |
37
|
|
|
|
|
|
|
'format' => '$1 $2', |
38
|
|
|
|
|
|
|
'leading_digits' => '[57]', |
39
|
|
|
|
|
|
|
'pattern' => '(\\d{4})(\\d{4})' |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
{ |
42
|
|
|
|
|
|
|
'format' => '$1 $2', |
43
|
|
|
|
|
|
|
'leading_digits' => '8', |
44
|
|
|
|
|
|
|
'pattern' => '(\\d{5})(\\d{5})' |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
]; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
my $validators = { |
49
|
|
|
|
|
|
|
'fixed_line' => ' |
50
|
|
|
|
|
|
|
(?: |
51
|
|
|
|
|
|
|
2(?: |
52
|
|
|
|
|
|
|
[0346-8]\\d| |
53
|
|
|
|
|
|
|
1[0-7] |
54
|
|
|
|
|
|
|
)| |
55
|
|
|
|
|
|
|
4(?: |
56
|
|
|
|
|
|
|
[013568]\\d| |
57
|
|
|
|
|
|
|
2[4-7] |
58
|
|
|
|
|
|
|
)| |
59
|
|
|
|
|
|
|
54(?: |
60
|
|
|
|
|
|
|
[3-5]\\d| |
61
|
|
|
|
|
|
|
71 |
62
|
|
|
|
|
|
|
)| |
63
|
|
|
|
|
|
|
6\\d\\d| |
64
|
|
|
|
|
|
|
8(?: |
65
|
|
|
|
|
|
|
14| |
66
|
|
|
|
|
|
|
3[129] |
67
|
|
|
|
|
|
|
) |
68
|
|
|
|
|
|
|
)\\d{4} |
69
|
|
|
|
|
|
|
', |
70
|
|
|
|
|
|
|
'geographic' => ' |
71
|
|
|
|
|
|
|
(?: |
72
|
|
|
|
|
|
|
2(?: |
73
|
|
|
|
|
|
|
[0346-8]\\d| |
74
|
|
|
|
|
|
|
1[0-7] |
75
|
|
|
|
|
|
|
)| |
76
|
|
|
|
|
|
|
4(?: |
77
|
|
|
|
|
|
|
[013568]\\d| |
78
|
|
|
|
|
|
|
2[4-7] |
79
|
|
|
|
|
|
|
)| |
80
|
|
|
|
|
|
|
54(?: |
81
|
|
|
|
|
|
|
[3-5]\\d| |
82
|
|
|
|
|
|
|
71 |
83
|
|
|
|
|
|
|
)| |
84
|
|
|
|
|
|
|
6\\d\\d| |
85
|
|
|
|
|
|
|
8(?: |
86
|
|
|
|
|
|
|
14| |
87
|
|
|
|
|
|
|
3[129] |
88
|
|
|
|
|
|
|
) |
89
|
|
|
|
|
|
|
)\\d{4} |
90
|
|
|
|
|
|
|
', |
91
|
|
|
|
|
|
|
'mobile' => ' |
92
|
|
|
|
|
|
|
5(?: |
93
|
|
|
|
|
|
|
4(?: |
94
|
|
|
|
|
|
|
2[1-389]| |
95
|
|
|
|
|
|
|
7[1-9] |
96
|
|
|
|
|
|
|
)| |
97
|
|
|
|
|
|
|
87[15-8] |
98
|
|
|
|
|
|
|
)\\d{4}| |
99
|
|
|
|
|
|
|
(?: |
100
|
|
|
|
|
|
|
5(?: |
101
|
|
|
|
|
|
|
2[5-9]| |
102
|
|
|
|
|
|
|
4[3-689]| |
103
|
|
|
|
|
|
|
[57]\\d| |
104
|
|
|
|
|
|
|
8[0-689]| |
105
|
|
|
|
|
|
|
9[0-8] |
106
|
|
|
|
|
|
|
)| |
107
|
|
|
|
|
|
|
7(?: |
108
|
|
|
|
|
|
|
01| |
109
|
|
|
|
|
|
|
30 |
110
|
|
|
|
|
|
|
) |
111
|
|
|
|
|
|
|
)\\d{5} |
112
|
|
|
|
|
|
|
', |
113
|
|
|
|
|
|
|
'pager' => '', |
114
|
|
|
|
|
|
|
'personal_number' => '', |
115
|
|
|
|
|
|
|
'specialrate' => '(30\\d{5})', |
116
|
|
|
|
|
|
|
'toll_free' => ' |
117
|
|
|
|
|
|
|
802\\d{7}| |
118
|
|
|
|
|
|
|
80[0-2]\\d{4} |
119
|
|
|
|
|
|
|
', |
120
|
|
|
|
|
|
|
'voip' => ' |
121
|
|
|
|
|
|
|
3(?: |
122
|
|
|
|
|
|
|
20| |
123
|
|
|
|
|
|
|
9\\d |
124
|
|
|
|
|
|
|
)\\d{4} |
125
|
|
|
|
|
|
|
' |
126
|
|
|
|
|
|
|
}; |
127
|
|
|
|
|
|
|
my %areanames = (); |
128
|
|
|
|
|
|
|
$areanames{fr} = {"2304", "Région\ Centrale", |
129
|
|
|
|
|
|
|
"2306", "Région\ Sud", |
130
|
|
|
|
|
|
|
"2302", "Région\ Nord",}; |
131
|
|
|
|
|
|
|
$areanames{en} = {"2302", "North\ Region", |
132
|
|
|
|
|
|
|
"23081", "Agalega", |
133
|
|
|
|
|
|
|
"23083", "Rodrigues", |
134
|
|
|
|
|
|
|
"2306", "South\ Region", |
135
|
|
|
|
|
|
|
"2304", "Central\ Region",}; |
136
|
|
|
|
|
|
|
$areanames{es} = {"2306", "Región\ Sur", |
137
|
|
|
|
|
|
|
"2304", "Región\ Central", |
138
|
|
|
|
|
|
|
"2302", "Región\ Norte",}; |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
sub new { |
141
|
16
|
|
|
16
|
1
|
42
|
my $class = shift; |
142
|
16
|
|
|
|
|
31
|
my $number = shift; |
143
|
16
|
|
|
|
|
103
|
$number =~ s/(^\+230|\D)//g; |
144
|
16
|
|
|
|
|
91
|
my $self = bless({ country_code => '230', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
145
|
16
|
100
|
|
|
|
73
|
return $self->is_valid() ? $self : undef; |
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
1; |