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::VU; |
20
|
2
|
|
|
2
|
|
1136
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
402
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
18
|
use strict; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
56
|
|
23
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
52
|
|
24
|
2
|
|
|
2
|
|
14
|
use utf8; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
11
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174405; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => '[57-9]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{4})' |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
]; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $validators = { |
36
|
|
|
|
|
|
|
'fixed_line' => ' |
37
|
|
|
|
|
|
|
(?: |
38
|
|
|
|
|
|
|
38[0-8]| |
39
|
|
|
|
|
|
|
48[4-9] |
40
|
|
|
|
|
|
|
)\\d\\d| |
41
|
|
|
|
|
|
|
(?: |
42
|
|
|
|
|
|
|
2[02-9]| |
43
|
|
|
|
|
|
|
3[4-7]| |
44
|
|
|
|
|
|
|
88 |
45
|
|
|
|
|
|
|
)\\d{3} |
46
|
|
|
|
|
|
|
', |
47
|
|
|
|
|
|
|
'geographic' => ' |
48
|
|
|
|
|
|
|
(?: |
49
|
|
|
|
|
|
|
38[0-8]| |
50
|
|
|
|
|
|
|
48[4-9] |
51
|
|
|
|
|
|
|
)\\d\\d| |
52
|
|
|
|
|
|
|
(?: |
53
|
|
|
|
|
|
|
2[02-9]| |
54
|
|
|
|
|
|
|
3[4-7]| |
55
|
|
|
|
|
|
|
88 |
56
|
|
|
|
|
|
|
)\\d{3} |
57
|
|
|
|
|
|
|
', |
58
|
|
|
|
|
|
|
'mobile' => ' |
59
|
|
|
|
|
|
|
(?: |
60
|
|
|
|
|
|
|
[58]\\d| |
61
|
|
|
|
|
|
|
7[013-7] |
62
|
|
|
|
|
|
|
)\\d{5} |
63
|
|
|
|
|
|
|
', |
64
|
|
|
|
|
|
|
'pager' => '', |
65
|
|
|
|
|
|
|
'personal_number' => '', |
66
|
|
|
|
|
|
|
'specialrate' => '( |
67
|
|
|
|
|
|
|
(?: |
68
|
|
|
|
|
|
|
3[03]| |
69
|
|
|
|
|
|
|
900\\d |
70
|
|
|
|
|
|
|
)\\d{3} |
71
|
|
|
|
|
|
|
)', |
72
|
|
|
|
|
|
|
'toll_free' => '81[18]\\d\\d', |
73
|
|
|
|
|
|
|
'voip' => ' |
74
|
|
|
|
|
|
|
9(?: |
75
|
|
|
|
|
|
|
0[1-9]| |
76
|
|
|
|
|
|
|
1[01] |
77
|
|
|
|
|
|
|
)\\d{4} |
78
|
|
|
|
|
|
|
' |
79
|
|
|
|
|
|
|
}; |
80
|
|
|
|
|
|
|
my %areanames = (); |
81
|
|
|
|
|
|
|
$areanames{en} = {"67837", "Luganville", |
82
|
|
|
|
|
|
|
"67826", "Port\ Vila\,\ Shefa", |
83
|
|
|
|
|
|
|
"67823", "Port\ Vila\,\ Shefa", |
84
|
|
|
|
|
|
|
"67825", "Port\ Vila\,\ Shefa", |
85
|
|
|
|
|
|
|
"67838", "Penama\/Torba", |
86
|
|
|
|
|
|
|
"67888", "Tafea", |
87
|
|
|
|
|
|
|
"67822", "Port\ Vila\,\ Shefa", |
88
|
|
|
|
|
|
|
"67824", "Port\ Vila\,\ Shefa", |
89
|
|
|
|
|
|
|
"6784", "Malampa", |
90
|
|
|
|
|
|
|
"67836", "Sanma", |
91
|
|
|
|
|
|
|
"67827", "Port\ Vila\,\ Shefa", |
92
|
|
|
|
|
|
|
"67829", "Port\ Vila\,\ Shefa", |
93
|
|
|
|
|
|
|
"67828", "Port\ Vila\,\ Shefa",}; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub new { |
96
|
16
|
|
|
16
|
1
|
34
|
my $class = shift; |
97
|
16
|
|
|
|
|
38
|
my $number = shift; |
98
|
16
|
|
|
|
|
97
|
$number =~ s/(^\+678|\D)//g; |
99
|
16
|
|
|
|
|
99
|
my $self = bless({ country_code => '678', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
100
|
16
|
100
|
|
|
|
82
|
return $self->is_valid() ? $self : undef; |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
1; |