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::GP; |
20
|
3
|
|
|
3
|
|
1521
|
use base qw(Number::Phone::StubCountry); |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
320
|
|
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
3
|
|
22
|
use strict; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
127
|
|
23
|
3
|
|
|
3
|
|
19
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
79
|
|
24
|
3
|
|
|
3
|
|
17
|
use utf8; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
19
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174403; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
30
|
|
|
|
|
|
|
'leading_digits' => '[569]', |
31
|
|
|
|
|
|
|
'national_rule' => '0$1', |
32
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{2})(\\d{2})(\\d{2})' |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
36
|
|
|
|
|
|
|
'leading_digits' => '8', |
37
|
|
|
|
|
|
|
'national_rule' => '0$1', |
38
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{2})(\\d{2})(\\d{2})' |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
]; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my $validators = { |
43
|
|
|
|
|
|
|
'fixed_line' => ' |
44
|
|
|
|
|
|
|
590(?: |
45
|
|
|
|
|
|
|
0[1-68]| |
46
|
|
|
|
|
|
|
[14][0-24-9]| |
47
|
|
|
|
|
|
|
2[0-68]| |
48
|
|
|
|
|
|
|
3[1289]| |
49
|
|
|
|
|
|
|
5[3-579]| |
50
|
|
|
|
|
|
|
[68][0-689]| |
51
|
|
|
|
|
|
|
7[08]| |
52
|
|
|
|
|
|
|
9\\d |
53
|
|
|
|
|
|
|
)\\d{4} |
54
|
|
|
|
|
|
|
', |
55
|
|
|
|
|
|
|
'geographic' => ' |
56
|
|
|
|
|
|
|
590(?: |
57
|
|
|
|
|
|
|
0[1-68]| |
58
|
|
|
|
|
|
|
[14][0-24-9]| |
59
|
|
|
|
|
|
|
2[0-68]| |
60
|
|
|
|
|
|
|
3[1289]| |
61
|
|
|
|
|
|
|
5[3-579]| |
62
|
|
|
|
|
|
|
[68][0-689]| |
63
|
|
|
|
|
|
|
7[08]| |
64
|
|
|
|
|
|
|
9\\d |
65
|
|
|
|
|
|
|
)\\d{4} |
66
|
|
|
|
|
|
|
', |
67
|
|
|
|
|
|
|
'mobile' => ' |
68
|
|
|
|
|
|
|
69(?: |
69
|
|
|
|
|
|
|
0\\d\\d| |
70
|
|
|
|
|
|
|
1(?: |
71
|
|
|
|
|
|
|
2[2-9]| |
72
|
|
|
|
|
|
|
3[0-5] |
73
|
|
|
|
|
|
|
) |
74
|
|
|
|
|
|
|
)\\d{4} |
75
|
|
|
|
|
|
|
', |
76
|
|
|
|
|
|
|
'pager' => '', |
77
|
|
|
|
|
|
|
'personal_number' => '', |
78
|
|
|
|
|
|
|
'specialrate' => '', |
79
|
|
|
|
|
|
|
'toll_free' => '80[0-5]\\d{6}', |
80
|
|
|
|
|
|
|
'voip' => ' |
81
|
|
|
|
|
|
|
9(?: |
82
|
|
|
|
|
|
|
(?: |
83
|
|
|
|
|
|
|
395| |
84
|
|
|
|
|
|
|
76[018] |
85
|
|
|
|
|
|
|
)\\d| |
86
|
|
|
|
|
|
|
475[0-2] |
87
|
|
|
|
|
|
|
)\\d{4} |
88
|
|
|
|
|
|
|
' |
89
|
|
|
|
|
|
|
}; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub new { |
92
|
57
|
|
|
57
|
1
|
127
|
my $class = shift; |
93
|
57
|
|
|
|
|
89
|
my $number = shift; |
94
|
57
|
|
|
|
|
344
|
$number =~ s/(^\+590|\D)//g; |
95
|
57
|
|
|
|
|
320
|
my $self = bless({ country_code => '590', number => $number, formatters => $formatters, validators => $validators, }, $class); |
96
|
57
|
100
|
|
|
|
293
|
return $self if ($self->is_valid()); |
97
|
9
|
|
|
|
|
23
|
$number =~ s/^(?:0)//; |
98
|
9
|
|
|
|
|
96
|
$self = bless({ country_code => '590', number => $number, formatters => $formatters, validators => $validators, }, $class); |
99
|
9
|
50
|
|
|
|
39
|
return $self->is_valid() ? $self : undef; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
1; |