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::VE; |
20
|
2
|
|
|
2
|
|
1330
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
275
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
21
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
50
|
|
23
|
2
|
|
|
2
|
|
17
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
61
|
|
24
|
2
|
|
|
2
|
|
16
|
use utf8; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
19
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174404; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1-$2', |
30
|
|
|
|
|
|
|
'leading_digits' => '[24-689]', |
31
|
|
|
|
|
|
|
'national_rule' => '0$1', |
32
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{7})' |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
]; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
my $validators = { |
37
|
|
|
|
|
|
|
'fixed_line' => ' |
38
|
|
|
|
|
|
|
(?: |
39
|
|
|
|
|
|
|
2(?: |
40
|
|
|
|
|
|
|
12| |
41
|
|
|
|
|
|
|
3[457-9]| |
42
|
|
|
|
|
|
|
[467]\\d| |
43
|
|
|
|
|
|
|
[58][1-9]| |
44
|
|
|
|
|
|
|
9[1-6] |
45
|
|
|
|
|
|
|
)| |
46
|
|
|
|
|
|
|
[4-6]00 |
47
|
|
|
|
|
|
|
)\\d{7} |
48
|
|
|
|
|
|
|
', |
49
|
|
|
|
|
|
|
'geographic' => ' |
50
|
|
|
|
|
|
|
(?: |
51
|
|
|
|
|
|
|
2(?: |
52
|
|
|
|
|
|
|
12| |
53
|
|
|
|
|
|
|
3[457-9]| |
54
|
|
|
|
|
|
|
[467]\\d| |
55
|
|
|
|
|
|
|
[58][1-9]| |
56
|
|
|
|
|
|
|
9[1-6] |
57
|
|
|
|
|
|
|
)| |
58
|
|
|
|
|
|
|
[4-6]00 |
59
|
|
|
|
|
|
|
)\\d{7} |
60
|
|
|
|
|
|
|
', |
61
|
|
|
|
|
|
|
'mobile' => ' |
62
|
|
|
|
|
|
|
4(?: |
63
|
|
|
|
|
|
|
1[24-8]| |
64
|
|
|
|
|
|
|
2[46] |
65
|
|
|
|
|
|
|
)\\d{7} |
66
|
|
|
|
|
|
|
', |
67
|
|
|
|
|
|
|
'pager' => '', |
68
|
|
|
|
|
|
|
'personal_number' => '', |
69
|
|
|
|
|
|
|
'specialrate' => '(90[01]\\d{7})|(501\\d{7})', |
70
|
|
|
|
|
|
|
'toll_free' => '800\\d{7}', |
71
|
|
|
|
|
|
|
'voip' => '' |
72
|
|
|
|
|
|
|
}; |
73
|
|
|
|
|
|
|
my %areanames = (); |
74
|
|
|
|
|
|
|
$areanames{en} = {"58241", "Carabobo", |
75
|
|
|
|
|
|
|
"58293", "Sucre", |
76
|
|
|
|
|
|
|
"58295", "Nueva\ Esparta", |
77
|
|
|
|
|
|
|
"58296", "Amazonas", |
78
|
|
|
|
|
|
|
"58276", "Táchira", |
79
|
|
|
|
|
|
|
"58289", "Bolívar", |
80
|
|
|
|
|
|
|
"58275", "Táchira\/Mérida\/Zulia", |
81
|
|
|
|
|
|
|
"58273", "Barinas", |
82
|
|
|
|
|
|
|
"58261", "Zulia", |
83
|
|
|
|
|
|
|
"58256", "Portuguesa", |
84
|
|
|
|
|
|
|
"58253", "Lara\/Yaracuy", |
85
|
|
|
|
|
|
|
"58282", "Anzoátegui", |
86
|
|
|
|
|
|
|
"5821", "Caracas\/Miranda\/Vargas", |
87
|
|
|
|
|
|
|
"58255", "Portuguesa", |
88
|
|
|
|
|
|
|
"58271", "Mérida\/Trujillo\/Zulia", |
89
|
|
|
|
|
|
|
"58287", "Delta\ Amacuro\/Monagas", |
90
|
|
|
|
|
|
|
"58246", "Aragua\/Guárico", |
91
|
|
|
|
|
|
|
"58245", "Carabobo", |
92
|
|
|
|
|
|
|
"58288", "Bolívar", |
93
|
|
|
|
|
|
|
"58243", "Aragua\/Carabobo", |
94
|
|
|
|
|
|
|
"58291", "Monagas", |
95
|
|
|
|
|
|
|
"58251", "Lara\/Yaracuy", |
96
|
|
|
|
|
|
|
"58235", "Anzoátegui\/Bolívar\/Guárico", |
97
|
|
|
|
|
|
|
"58240", "Apure\/Barinas", |
98
|
|
|
|
|
|
|
"58266", "Zulia", |
99
|
|
|
|
|
|
|
"58265", "Zulia", |
100
|
|
|
|
|
|
|
"58284", "Bolívar", |
101
|
|
|
|
|
|
|
"58263", "Zulia", |
102
|
|
|
|
|
|
|
"58269", "Falcón", |
103
|
|
|
|
|
|
|
"58258", "Cojedes", |
104
|
|
|
|
|
|
|
"58242", "Carabobo", |
105
|
|
|
|
|
|
|
"58274", "Mérida", |
106
|
|
|
|
|
|
|
"58239", "Miranda", |
107
|
|
|
|
|
|
|
"58294", "Sucre", |
108
|
|
|
|
|
|
|
"58257", "Portuguesa", |
109
|
|
|
|
|
|
|
"58249", "Carabobo", |
110
|
|
|
|
|
|
|
"58254", "Yaracuy", |
111
|
|
|
|
|
|
|
"58262", "Zulia", |
112
|
|
|
|
|
|
|
"58278", "Apure\/Barinas", |
113
|
|
|
|
|
|
|
"58281", "Anzoátegui", |
114
|
|
|
|
|
|
|
"58277", "Táchira\/Mérida", |
115
|
|
|
|
|
|
|
"58259", "Falcón", |
116
|
|
|
|
|
|
|
"58237", "Federal\ Dependencies", |
117
|
|
|
|
|
|
|
"58268", "Falcón", |
118
|
|
|
|
|
|
|
"58244", "Aragua", |
119
|
|
|
|
|
|
|
"58272", "Trujillo", |
120
|
|
|
|
|
|
|
"58292", "Anzoátegui\/Monagas", |
121
|
|
|
|
|
|
|
"58267", "Zulia", |
122
|
|
|
|
|
|
|
"58238", "Guárico", |
123
|
|
|
|
|
|
|
"58279", "Falcón", |
124
|
|
|
|
|
|
|
"58286", "Anzoátegui\/Bolívar", |
125
|
|
|
|
|
|
|
"58252", "Lara", |
126
|
|
|
|
|
|
|
"58285", "Anzoátegui\/Bolívar", |
127
|
|
|
|
|
|
|
"58264", "Zulia", |
128
|
|
|
|
|
|
|
"58248", "Amazonas", |
129
|
|
|
|
|
|
|
"58283", "Anzoátegui", |
130
|
|
|
|
|
|
|
"58247", "Apure\/Barinas\/Guárico", |
131
|
|
|
|
|
|
|
"58234", "Miranda",}; |
132
|
|
|
|
|
|
|
$areanames{es} = {"5821", "Distrito\ Capital\/Miranda\/Vargas", |
133
|
|
|
|
|
|
|
"58275", "Mérida\/Táchira\/Zulia", |
134
|
|
|
|
|
|
|
"58277", "Mérida\/Táchira", |
135
|
|
|
|
|
|
|
"58237", "Dependencias\ Federales",}; |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub new { |
138
|
16
|
|
|
16
|
1
|
34
|
my $class = shift; |
139
|
16
|
|
|
|
|
30
|
my $number = shift; |
140
|
16
|
|
|
|
|
111
|
$number =~ s/(^\+58|\D)//g; |
141
|
16
|
|
|
|
|
93
|
my $self = bless({ country_code => '58', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
142
|
16
|
100
|
|
|
|
83
|
return $self if ($self->is_valid()); |
143
|
1
|
|
|
|
|
3
|
$number =~ s/^(?:0)//; |
144
|
1
|
|
|
|
|
11
|
$self = bless({ country_code => '58', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
145
|
1
|
50
|
|
|
|
5
|
return $self->is_valid() ? $self : undef; |
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
1; |