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