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
|
|
1179
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
228
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
46
|
|
23
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
56
|
|
24
|
2
|
|
|
2
|
|
12
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
15
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
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} = {"598447", "Rocha", |
104
|
|
|
|
|
|
|
"5984365", "Durazno", |
105
|
|
|
|
|
|
|
"5984366", "Durazno", |
106
|
|
|
|
|
|
|
"598453", "Mercedes\/Soriano", |
107
|
|
|
|
|
|
|
"598456", "Fray\ Bentos\/Rio\ Negro", |
108
|
|
|
|
|
|
|
"598462", "Rivera", |
109
|
|
|
|
|
|
|
"5984364", "Trinidad\/Flores", |
110
|
|
|
|
|
|
|
"5984367", "Durazno", |
111
|
|
|
|
|
|
|
"598477", "Artigas", |
112
|
|
|
|
|
|
|
"5984360", "Durazno", |
113
|
|
|
|
|
|
|
"5984363", "Durazno", |
114
|
|
|
|
|
|
|
"598472", "Paysandu", |
115
|
|
|
|
|
|
|
"5984368", "Durazno", |
116
|
|
|
|
|
|
|
"598434", "San\ Jose\ de\ Mayo", |
117
|
|
|
|
|
|
|
"598464", "Melo\/Cerro\ Largo", |
118
|
|
|
|
|
|
|
"5984362", "Durazno", |
119
|
|
|
|
|
|
|
"598435", "Florida", |
120
|
|
|
|
|
|
|
"598473", "Salto", |
121
|
|
|
|
|
|
|
"598444", "Minas\/Lavalleja", |
122
|
|
|
|
|
|
|
"598433", "Canelones", |
123
|
|
|
|
|
|
|
"59842", "San\ Carlos", |
124
|
|
|
|
|
|
|
"5984361", "Durazno", |
125
|
|
|
|
|
|
|
"598463", "Tacuarembo", |
126
|
|
|
|
|
|
|
"598452", "Colonia\ del\ Scaramento", |
127
|
|
|
|
|
|
|
"5984369", "Durazno", |
128
|
|
|
|
|
|
|
"5982", "Montevideo", |
129
|
|
|
|
|
|
|
"598445", "Treinta\ y\ Tres",}; |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub new { |
132
|
13
|
|
|
13
|
1
|
28
|
my $class = shift; |
133
|
13
|
|
|
|
|
42
|
my $number = shift; |
134
|
13
|
|
|
|
|
82
|
$number =~ s/(^\+598|\D)//g; |
135
|
13
|
|
|
|
|
75
|
my $self = bless({ country_code => '598', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
136
|
13
|
100
|
|
|
|
70
|
return $self if ($self->is_valid()); |
137
|
1
|
|
|
|
|
4
|
$number =~ s/^(?:0)//; |
138
|
1
|
|
|
|
|
12
|
$self = bless({ country_code => '598', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
139
|
1
|
50
|
|
|
|
7
|
return $self->is_valid() ? $self : undef; |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
1; |