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