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::UY; |
20
|
2
|
|
|
2
|
|
1394
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
300
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
22
|
use strict; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
56
|
|
23
|
2
|
|
|
2
|
|
19
|
use warnings; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
67
|
|
24
|
2
|
|
|
2
|
|
17
|
use utf8; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
24
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174404; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
405| |
32
|
|
|
|
|
|
|
8| |
33
|
|
|
|
|
|
|
90 |
34
|
|
|
|
|
|
|
', |
35
|
|
|
|
|
|
|
'national_rule' => '0$1', |
36
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
37
|
|
|
|
|
|
|
}, |
38
|
|
|
|
|
|
|
{ |
39
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
40
|
|
|
|
|
|
|
'leading_digits' => '9', |
41
|
|
|
|
|
|
|
'national_rule' => '0$1', |
42
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3})(\\d{3})' |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
{ |
45
|
|
|
|
|
|
|
'format' => '$1 $2', |
46
|
|
|
|
|
|
|
'leading_digits' => '[124]', |
47
|
|
|
|
|
|
|
'pattern' => '(\\d{4})(\\d{4})' |
48
|
|
|
|
|
|
|
}, |
49
|
|
|
|
|
|
|
{ |
50
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
51
|
|
|
|
|
|
|
'leading_digits' => '4', |
52
|
|
|
|
|
|
|
'national_rule' => '0$1', |
53
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{4})' |
54
|
|
|
|
|
|
|
}, |
55
|
|
|
|
|
|
|
{ |
56
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
57
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{3})(\\d{3})(\\d{4})' |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
]; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
my $validators = { |
62
|
|
|
|
|
|
|
'fixed_line' => ' |
63
|
|
|
|
|
|
|
(?: |
64
|
|
|
|
|
|
|
1(?: |
65
|
|
|
|
|
|
|
770| |
66
|
|
|
|
|
|
|
987 |
67
|
|
|
|
|
|
|
)| |
68
|
|
|
|
|
|
|
(?: |
69
|
|
|
|
|
|
|
2\\d| |
70
|
|
|
|
|
|
|
4[2-7] |
71
|
|
|
|
|
|
|
)\\d\\d |
72
|
|
|
|
|
|
|
)\\d{4} |
73
|
|
|
|
|
|
|
', |
74
|
|
|
|
|
|
|
'geographic' => ' |
75
|
|
|
|
|
|
|
(?: |
76
|
|
|
|
|
|
|
1(?: |
77
|
|
|
|
|
|
|
770| |
78
|
|
|
|
|
|
|
987 |
79
|
|
|
|
|
|
|
)| |
80
|
|
|
|
|
|
|
(?: |
81
|
|
|
|
|
|
|
2\\d| |
82
|
|
|
|
|
|
|
4[2-7] |
83
|
|
|
|
|
|
|
)\\d\\d |
84
|
|
|
|
|
|
|
)\\d{4} |
85
|
|
|
|
|
|
|
', |
86
|
|
|
|
|
|
|
'mobile' => '9[1-9]\\d{6}', |
87
|
|
|
|
|
|
|
'pager' => '', |
88
|
|
|
|
|
|
|
'personal_number' => '', |
89
|
|
|
|
|
|
|
'specialrate' => '(90[0-8]\\d{4})', |
90
|
|
|
|
|
|
|
'toll_free' => ' |
91
|
|
|
|
|
|
|
(?: |
92
|
|
|
|
|
|
|
(?: |
93
|
|
|
|
|
|
|
0004| |
94
|
|
|
|
|
|
|
4 |
95
|
|
|
|
|
|
|
)\\d{5}| |
96
|
|
|
|
|
|
|
80[05] |
97
|
|
|
|
|
|
|
)\\d{4}| |
98
|
|
|
|
|
|
|
405\\d{4} |
99
|
|
|
|
|
|
|
', |
100
|
|
|
|
|
|
|
'voip' => '' |
101
|
|
|
|
|
|
|
}; |
102
|
|
|
|
|
|
|
my %areanames = (); |
103
|
|
|
|
|
|
|
$areanames{en} = {"598477", "Artigas", |
104
|
|
|
|
|
|
|
"598472", "Paysandu", |
105
|
|
|
|
|
|
|
"5984361", "Durazno", |
106
|
|
|
|
|
|
|
"5984362", "Durazno", |
107
|
|
|
|
|
|
|
"598444", "Minas\/Lavalleja", |
108
|
|
|
|
|
|
|
"598445", "Treinta\ y\ Tres", |
109
|
|
|
|
|
|
|
"5982", "Montevideo", |
110
|
|
|
|
|
|
|
"598452", "Colonia\ del\ Scaramento", |
111
|
|
|
|
|
|
|
"598462", "Rivera", |
112
|
|
|
|
|
|
|
"598434", "San\ Jose\ de\ Mayo", |
113
|
|
|
|
|
|
|
"598435", "Florida", |
114
|
|
|
|
|
|
|
"598447", "Rocha", |
115
|
|
|
|
|
|
|
"5984369", "Durazno", |
116
|
|
|
|
|
|
|
"5984368", "Durazno", |
117
|
|
|
|
|
|
|
"5984364", "Trinidad\/Flores", |
118
|
|
|
|
|
|
|
"598464", "Melo\/Cerro\ Largo", |
119
|
|
|
|
|
|
|
"598456", "Fray\ Bentos\/Rio\ Negro", |
120
|
|
|
|
|
|
|
"5984363", "Durazno", |
121
|
|
|
|
|
|
|
"5984365", "Durazno", |
122
|
|
|
|
|
|
|
"598473", "Salto", |
123
|
|
|
|
|
|
|
"59842", "San\ Carlos", |
124
|
|
|
|
|
|
|
"5984360", "Durazno", |
125
|
|
|
|
|
|
|
"5984366", "Durazno", |
126
|
|
|
|
|
|
|
"598463", "Tacuarembo", |
127
|
|
|
|
|
|
|
"598453", "Mercedes\/Soriano", |
128
|
|
|
|
|
|
|
"598433", "Canelones", |
129
|
|
|
|
|
|
|
"5984367", "Durazno",}; |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub new { |
132
|
13
|
|
|
13
|
1
|
38
|
my $class = shift; |
133
|
13
|
|
|
|
|
30
|
my $number = shift; |
134
|
13
|
|
|
|
|
86
|
$number =~ s/(^\+598|\D)//g; |
135
|
13
|
|
|
|
|
80
|
my $self = bless({ country_code => '598', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
136
|
13
|
100
|
|
|
|
75
|
return $self if ($self->is_valid()); |
137
|
1
|
|
|
|
|
13
|
$number =~ s/^(?:0)//; |
138
|
1
|
|
|
|
|
12
|
$self = bless({ country_code => '598', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
139
|
1
|
50
|
|
|
|
6
|
return $self->is_valid() ? $self : undef; |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
1; |