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
|
|
1286
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
235
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
59
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
58
|
|
24
|
2
|
|
|
2
|
|
17
|
use utf8; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
11
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174402; |
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} = {"238241", "Espargos\,\ Sal", |
78
|
|
|
|
|
|
|
"238269", "Pedra\ Badejo\,\ Santiago", |
79
|
|
|
|
|
|
|
"238265", "Santa\ Catarina\,\ Santiago", |
80
|
|
|
|
|
|
|
"238223", "Paúl\,\ Santo\ Antão", |
81
|
|
|
|
|
|
|
"238264", "Praia\,\ Santiago", |
82
|
|
|
|
|
|
|
"238235", "Ribeira\ Brava\,\ São\ Nicolau", |
83
|
|
|
|
|
|
|
"238242", "Santa\ Maria\,\ Sal", |
84
|
|
|
|
|
|
|
"238255", "Vila\ do\ Maio\,\ Maio", |
85
|
|
|
|
|
|
|
"238231", "Mindelo\,\ São\ Vicente", |
86
|
|
|
|
|
|
|
"238267", "Cidade\ Velha\,\ Santiago", |
87
|
|
|
|
|
|
|
"238262", "Praia\,\ Santiago", |
88
|
|
|
|
|
|
|
"238230", "Mindelo\,\ São\ Vicente", |
89
|
|
|
|
|
|
|
"238251", "Sal\ Rei\,\ Boa\ Vista", |
90
|
|
|
|
|
|
|
"238232", "Mindelo\,\ São\ Vicente", |
91
|
|
|
|
|
|
|
"238260", "Praia\,\ Santiago", |
92
|
|
|
|
|
|
|
"238237", "Fajã\,\ São\ Nicolau", |
93
|
|
|
|
|
|
|
"238252", "Funda\ das\ Figueiras\,\ Boa\ Vista", |
94
|
|
|
|
|
|
|
"238261", "Praia\,\ Santiago", |
95
|
|
|
|
|
|
|
"238281", "São\ Filipe\,\ Fogo", |
96
|
|
|
|
|
|
|
"238226", "Manta\ Velha\/Chã\ de\ Igreja\ \ \(Santo\ Antão\ Island\)", |
97
|
|
|
|
|
|
|
"238282", "Cova\ Figueira\,\ Fogo", |
98
|
|
|
|
|
|
|
"238238", "Praia\ Branca\,\ São\ Nicolau", |
99
|
|
|
|
|
|
|
"238271", "Orgão\/São\ Jorge\ \(Santiago\ Island\)", |
100
|
|
|
|
|
|
|
"238284", "São\ Jorge\,\ Fogo", |
101
|
|
|
|
|
|
|
"238268", "São\ Domingos\,\ Santiago", |
102
|
|
|
|
|
|
|
"238285", "Nova\ Sintra\,\ Brava", |
103
|
|
|
|
|
|
|
"238272", "Picos\,\ Santiago", |
104
|
|
|
|
|
|
|
"238221", "Ribeira\ Grande\,\ Santo\ Antão", |
105
|
|
|
|
|
|
|
"238222", "Porto\ Novo\,\ Santo\ Antão", |
106
|
|
|
|
|
|
|
"238227", "Lajedos\/Alto\ Mira\ \(Santo\ Antão\ Island\)", |
107
|
|
|
|
|
|
|
"238224", "Cocoli\,\ Santo\ Antão", |
108
|
|
|
|
|
|
|
"238263", "Praia\,\ Santiago", |
109
|
|
|
|
|
|
|
"238225", "Ponta\ do\ Sol\,\ Santo\ Antão", |
110
|
|
|
|
|
|
|
"238283", "Mosteiros\,\ Fogo", |
111
|
|
|
|
|
|
|
"238273", "Calheta\ de\ São\ Miguel\,\ Santiago", |
112
|
|
|
|
|
|
|
"238266", "Tarrafal\,\ Santiago", |
113
|
|
|
|
|
|
|
"238236", "Tarrafal\ de\ São\ Nicolau\,\ São\ Nicolau", |
114
|
|
|
|
|
|
|
"238256", "Calheta\,\ Maio",}; |
115
|
|
|
|
|
|
|
$areanames{pt} = {}; |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
sub new { |
118
|
13
|
|
|
13
|
1
|
30
|
my $class = shift; |
119
|
13
|
|
|
|
|
31
|
my $number = shift; |
120
|
13
|
|
|
|
|
82
|
$number =~ s/(^\+238|\D)//g; |
121
|
13
|
|
|
|
|
83
|
my $self = bless({ country_code => '238', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
122
|
13
|
100
|
|
|
|
69
|
return $self->is_valid() ? $self : undef; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
1; |