blib/lib/Number/Phone/StubCountry/VE.pm

filter: Statementstmt 100% 28 / 28 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 97.3% 37 / 38 CC 3 SCAR 6.2
CC
3
Cov
97%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« blib/lib/Number/Phone/StubCountry/UY.pm ↑ Summary blib/lib/Number/Phone/StubCountry/VN.pm »
1 # automatically generated file, don't edit
2  
3  
4  
5 # Copyright 2026 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 ▶use base qw(Number::Phone::StubCountry);
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 our $VERSION = 1.20260904101551;
26  
27 2 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 2 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[246]
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 2 my %areanames = ();
74 2 $areanames{es} = {"58237", "Dependencias\ Federales",
75 "58277", "Mérida\/Táchira",
76 "5821", "Distrito\ Capital\/Miranda\/Vargas",
77 "58275", "Mérida\/Táchira\/Zulia",};
78 2 $areanames{en} = {"58274", "Mérida",
79 "58293", "Sucre",
80 "58269", "Falcón",
81 "58292", "Anzoátegui\/Monagas",
82 "58273", "Barinas",
83 "58294", "Sucre",
84 "58286", "Anzoátegui\/Bolívar",
85 "58245", "Carabobo",
86 "58272", "Trujillo",
87 "58267", "Zulia",
88 "58248", "Amazonas",
89 "58234", "Miranda",
90 "58261", "Zulia",
91 "58256", "Portuguesa",
92 "58235", "Anzoátegui\/Bolívar\/Guárico",
93 "58281", "Anzoátegui",
94 "58278", "Apure\/Barinas",
95 "58287", "Delta\ Amacuro\/Monagas",
96 "58259", "Falcón",
97 "58244", "Aragua",
98 "58251", "Lara\/Yaracuy",
99 "58238", "Guárico",
100 "58266", "Zulia",
101 "58295", "Nueva\ Esparta",
102 "58243", "Aragua\/Carabobo",
103 "58289", "Bolívar",
104 "58257", "Portuguesa",
105 "58275", "Táchira\/Mérida\/Zulia",
106 "58242", "Carabobo",
107 "58246", "Aragua\/Guárico",
108 "58264", "Zulia",
109 "58279", "Falcón",
110 "58285", "Anzoátegui\/Bolívar",
111 "58258", "Cojedes",
112 "58263", "Zulia",
113 "58237", "Federal\ Dependencies",
114 "58262", "Zulia",
115 "58288", "Bolívar",
116 "58255", "Portuguesa",
117 "58277", "Táchira\/Mérida",
118 "58291", "Monagas",
119 "58239", "Miranda",
120 "58271", "Mérida\/Trujillo\/Zulia",
121 "58252", "Lara",
122 "58247", "Apure\/Barinas\/Guárico",
123 "58253", "Lara\/Yaracuy",
124 "5821", "Caracas\/Miranda\/Vargas",
125 "58268", "Falcón",
126 "58254", "Yaracuy",
127 "58241", "Carabobo",
128 "58276", "Táchira",
129 "58283", "Anzoátegui",
130 "58249", "Carabobo",
131 "58282", "Anzoátegui",
132 "58284", "Bolívar",
133 "58296", "Amazonas",
134 "58240", "Apure\/Barinas",
135 "58265", "Zulia",};
136 2 my $timezones = {
137 '' => [
138 'America/Caracas'
139 ]
140 };
141  
142 16 ▶ sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
143 16 my $class = shift;
144 16 my $number = shift;
145 16 $number =~ s/(^\+58|\D)//g;
146 16 my $self = bless({ country_code => '58', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
147 16 ▶ return $self if ($self->is_valid());
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_valid 15 1 16
148 1 $number =~ s/^(?:0)//;
149 1 $self = bless({ country_code => '58', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
150 1 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 0 1 1
151 }
152 2 1;
« blib/lib/Number/Phone/StubCountry/UY.pm ↑ Summary blib/lib/Number/Phone/StubCountry/VN.pm »