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::CV; |
20
|
2
|
|
|
2
|
|
1131
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
236
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
16
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
49
|
|
23
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
50
|
|
24
|
2
|
|
|
2
|
|
14
|
use utf8; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
14
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181419; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
30
|
|
|
|
|
|
|
'leading_digits' => '[2-589]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{2})(\\d{2})' |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
]; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $validators = { |
36
|
|
|
|
|
|
|
'fixed_line' => ' |
37
|
|
|
|
|
|
|
2(?: |
38
|
|
|
|
|
|
|
2[1-7]| |
39
|
|
|
|
|
|
|
3[0-8]| |
40
|
|
|
|
|
|
|
4[12]| |
41
|
|
|
|
|
|
|
5[1256]| |
42
|
|
|
|
|
|
|
6\\d| |
43
|
|
|
|
|
|
|
7[1-3]| |
44
|
|
|
|
|
|
|
8[1-5] |
45
|
|
|
|
|
|
|
)\\d{4} |
46
|
|
|
|
|
|
|
', |
47
|
|
|
|
|
|
|
'geographic' => ' |
48
|
|
|
|
|
|
|
2(?: |
49
|
|
|
|
|
|
|
2[1-7]| |
50
|
|
|
|
|
|
|
3[0-8]| |
51
|
|
|
|
|
|
|
4[12]| |
52
|
|
|
|
|
|
|
5[1256]| |
53
|
|
|
|
|
|
|
6\\d| |
54
|
|
|
|
|
|
|
7[1-3]| |
55
|
|
|
|
|
|
|
8[1-5] |
56
|
|
|
|
|
|
|
)\\d{4} |
57
|
|
|
|
|
|
|
', |
58
|
|
|
|
|
|
|
'mobile' => ' |
59
|
|
|
|
|
|
|
(?: |
60
|
|
|
|
|
|
|
36| |
61
|
|
|
|
|
|
|
5[1-389]| |
62
|
|
|
|
|
|
|
9\\d |
63
|
|
|
|
|
|
|
)\\d{5} |
64
|
|
|
|
|
|
|
', |
65
|
|
|
|
|
|
|
'pager' => '', |
66
|
|
|
|
|
|
|
'personal_number' => '', |
67
|
|
|
|
|
|
|
'specialrate' => '', |
68
|
|
|
|
|
|
|
'toll_free' => '800\\d{4}', |
69
|
|
|
|
|
|
|
'voip' => ' |
70
|
|
|
|
|
|
|
(?: |
71
|
|
|
|
|
|
|
3[3-5]| |
72
|
|
|
|
|
|
|
4[356] |
73
|
|
|
|
|
|
|
)\\d{5} |
74
|
|
|
|
|
|
|
' |
75
|
|
|
|
|
|
|
}; |
76
|
|
|
|
|
|
|
my %areanames = (); |
77
|
|
|
|
|
|
|
$areanames{en} = {"238224", "Cocoli\,\ Santo\ Antão", |
78
|
|
|
|
|
|
|
"238235", "Ribeira\ Brava\,\ São\ Nicolau", |
79
|
|
|
|
|
|
|
"238265", "Santa\ Catarina\,\ Santiago", |
80
|
|
|
|
|
|
|
"238241", "Espargos\,\ Sal", |
81
|
|
|
|
|
|
|
"238226", "Manta\ Velha\/Chã\ de\ Igreja\ \ \(Santo\ Antão\ Island\)", |
82
|
|
|
|
|
|
|
"238256", "Calheta\,\ Maio", |
83
|
|
|
|
|
|
|
"238284", "São\ Jorge\,\ Fogo", |
84
|
|
|
|
|
|
|
"238268", "São\ Domingos\,\ Santiago", |
85
|
|
|
|
|
|
|
"238262", "Praia\,\ Santiago", |
86
|
|
|
|
|
|
|
"238267", "Cidade\ Velha\,\ Santiago", |
87
|
|
|
|
|
|
|
"238237", "Fajã\,\ São\ Nicolau", |
88
|
|
|
|
|
|
|
"238232", "Mindelo\,\ São\ Vicente", |
89
|
|
|
|
|
|
|
"238263", "Praia\,\ Santiago", |
90
|
|
|
|
|
|
|
"238238", "Praia\ Branca\,\ São\ Nicolau", |
91
|
|
|
|
|
|
|
"238261", "Praia\,\ Santiago", |
92
|
|
|
|
|
|
|
"238269", "Pedra\ Badejo\,\ Santiago", |
93
|
|
|
|
|
|
|
"238231", "Mindelo\,\ São\ Vicente", |
94
|
|
|
|
|
|
|
"238242", "Santa\ Maria\,\ Sal", |
95
|
|
|
|
|
|
|
"238251", "Sal\ Rei\,\ Boa\ Vista", |
96
|
|
|
|
|
|
|
"238221", "Ribeira\ Grande\,\ Santo\ Antão", |
97
|
|
|
|
|
|
|
"238273", "Calheta\ de\ São\ Miguel\,\ Santiago", |
98
|
|
|
|
|
|
|
"238281", "São\ Filipe\,\ Fogo", |
99
|
|
|
|
|
|
|
"238272", "Picos\,\ Santiago", |
100
|
|
|
|
|
|
|
"238283", "Mosteiros\,\ Fogo", |
101
|
|
|
|
|
|
|
"238230", "Mindelo\,\ São\ Vicente", |
102
|
|
|
|
|
|
|
"238255", "Vila\ do\ Maio\,\ Maio", |
103
|
|
|
|
|
|
|
"238225", "Ponta\ do\ Sol\,\ Santo\ Antão", |
104
|
|
|
|
|
|
|
"238266", "Tarrafal\,\ Santiago", |
105
|
|
|
|
|
|
|
"238282", "Cova\ Figueira\,\ Fogo", |
106
|
|
|
|
|
|
|
"238236", "Tarrafal\ de\ São\ Nicolau\,\ São\ Nicolau", |
107
|
|
|
|
|
|
|
"238271", "Orgão\/São\ Jorge\ \(Santiago\ Island\)", |
108
|
|
|
|
|
|
|
"238264", "Praia\,\ Santiago", |
109
|
|
|
|
|
|
|
"238260", "Praia\,\ Santiago", |
110
|
|
|
|
|
|
|
"238223", "Paúl\,\ Santo\ Antão", |
111
|
|
|
|
|
|
|
"238285", "Nova\ Sintra\,\ Brava", |
112
|
|
|
|
|
|
|
"238222", "Porto\ Novo\,\ Santo\ Antão", |
113
|
|
|
|
|
|
|
"238227", "Lajedos\/Alto\ Mira\ \(Santo\ Antão\ Island\)", |
114
|
|
|
|
|
|
|
"238252", "Funda\ das\ Figueiras\,\ Boa\ Vista",}; |
115
|
|
|
|
|
|
|
$areanames{pt} = {}; |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
sub new { |
118
|
13
|
|
|
13
|
1
|
28
|
my $class = shift; |
119
|
13
|
|
|
|
|
23
|
my $number = shift; |
120
|
13
|
|
|
|
|
76
|
$number =~ s/(^\+238|\D)//g; |
121
|
13
|
|
|
|
|
77
|
my $self = bless({ country_code => '238', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
122
|
13
|
100
|
|
|
|
60
|
return $self->is_valid() ? $self : undef; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
1; |