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::RE; |
20
|
3
|
|
|
3
|
|
1789
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
391
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
27
|
use strict; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
74
|
|
23
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
79
|
|
24
|
3
|
|
|
3
|
|
25
|
use utf8; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
23
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
30
|
|
|
|
|
|
|
'leading_digits' => '[2689]', |
31
|
|
|
|
|
|
|
'national_rule' => '0$1', |
32
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{2})(\\d{2})(\\d{2})' |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
]; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
my $validators = { |
37
|
|
|
|
|
|
|
'fixed_line' => ' |
38
|
|
|
|
|
|
|
26(?: |
39
|
|
|
|
|
|
|
2\\d\\d| |
40
|
|
|
|
|
|
|
3(?: |
41
|
|
|
|
|
|
|
0\\d| |
42
|
|
|
|
|
|
|
1[0-5] |
43
|
|
|
|
|
|
|
) |
44
|
|
|
|
|
|
|
)\\d{4} |
45
|
|
|
|
|
|
|
', |
46
|
|
|
|
|
|
|
'geographic' => ' |
47
|
|
|
|
|
|
|
26(?: |
48
|
|
|
|
|
|
|
2\\d\\d| |
49
|
|
|
|
|
|
|
3(?: |
50
|
|
|
|
|
|
|
0\\d| |
51
|
|
|
|
|
|
|
1[0-5] |
52
|
|
|
|
|
|
|
) |
53
|
|
|
|
|
|
|
)\\d{4} |
54
|
|
|
|
|
|
|
', |
55
|
|
|
|
|
|
|
'mobile' => ' |
56
|
|
|
|
|
|
|
69(?: |
57
|
|
|
|
|
|
|
2\\d\\d| |
58
|
|
|
|
|
|
|
3(?: |
59
|
|
|
|
|
|
|
[06][0-6]| |
60
|
|
|
|
|
|
|
1[013]| |
61
|
|
|
|
|
|
|
2[0-2]| |
62
|
|
|
|
|
|
|
3[0-39]| |
63
|
|
|
|
|
|
|
4\\d| |
64
|
|
|
|
|
|
|
5[0-5]| |
65
|
|
|
|
|
|
|
7[0-27]| |
66
|
|
|
|
|
|
|
8[0-8]| |
67
|
|
|
|
|
|
|
9[0-479] |
68
|
|
|
|
|
|
|
) |
69
|
|
|
|
|
|
|
)\\d{4} |
70
|
|
|
|
|
|
|
', |
71
|
|
|
|
|
|
|
'pager' => '', |
72
|
|
|
|
|
|
|
'personal_number' => '', |
73
|
|
|
|
|
|
|
'specialrate' => '( |
74
|
|
|
|
|
|
|
8(?: |
75
|
|
|
|
|
|
|
1[019]| |
76
|
|
|
|
|
|
|
2[0156]| |
77
|
|
|
|
|
|
|
84| |
78
|
|
|
|
|
|
|
90 |
79
|
|
|
|
|
|
|
)\\d{6} |
80
|
|
|
|
|
|
|
)|(89[1-37-9]\\d{6})', |
81
|
|
|
|
|
|
|
'toll_free' => '80\\d{7}', |
82
|
|
|
|
|
|
|
'voip' => ' |
83
|
|
|
|
|
|
|
9(?: |
84
|
|
|
|
|
|
|
399[0-3]| |
85
|
|
|
|
|
|
|
479[0-5]| |
86
|
|
|
|
|
|
|
76(?: |
87
|
|
|
|
|
|
|
2[27]| |
88
|
|
|
|
|
|
|
3[0-37] |
89
|
|
|
|
|
|
|
) |
90
|
|
|
|
|
|
|
)\\d{4} |
91
|
|
|
|
|
|
|
' |
92
|
|
|
|
|
|
|
}; |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub new { |
95
|
46
|
|
|
46
|
1
|
106
|
my $class = shift; |
96
|
46
|
|
|
|
|
86
|
my $number = shift; |
97
|
46
|
|
|
|
|
291
|
$number =~ s/(^\+262|\D)//g; |
98
|
46
|
|
|
|
|
225
|
my $self = bless({ country_code => '262', number => $number, formatters => $formatters, validators => $validators, }, $class); |
99
|
46
|
100
|
|
|
|
203
|
return $self if ($self->is_valid()); |
100
|
6
|
|
|
|
|
24
|
$number =~ s/^(?:0)//; |
101
|
6
|
|
|
|
|
59
|
$self = bless({ country_code => '262', number => $number, formatters => $formatters, validators => $validators, }, $class); |
102
|
6
|
50
|
|
|
|
29
|
return $self->is_valid() ? $self : undef; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
1; |