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
|
|
1146
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
227
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
19
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
57
|
|
23
|
2
|
|
|
2
|
|
24
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
50
|
|
24
|
2
|
|
|
2
|
|
20
|
use utf8; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
15
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131449; |
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} = {"67836", "Sanma", |
82
|
|
|
|
|
|
|
"67826", "Port\ Vila\,\ Shefa", |
83
|
|
|
|
|
|
|
"67828", "Port\ Vila\,\ Shefa", |
84
|
|
|
|
|
|
|
"67838", "Penama\/Torba", |
85
|
|
|
|
|
|
|
"6784", "Malampa", |
86
|
|
|
|
|
|
|
"67829", "Port\ Vila\,\ Shefa", |
87
|
|
|
|
|
|
|
"67823", "Port\ Vila\,\ Shefa", |
88
|
|
|
|
|
|
|
"67822", "Port\ Vila\,\ Shefa", |
89
|
|
|
|
|
|
|
"67827", "Port\ Vila\,\ Shefa", |
90
|
|
|
|
|
|
|
"67837", "Luganville", |
91
|
|
|
|
|
|
|
"67888", "Tafea", |
92
|
|
|
|
|
|
|
"67825", "Port\ Vila\,\ Shefa", |
93
|
|
|
|
|
|
|
"67824", "Port\ Vila\,\ Shefa",}; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub new { |
96
|
16
|
|
|
16
|
1
|
42
|
my $class = shift; |
97
|
16
|
|
|
|
|
30
|
my $number = shift; |
98
|
16
|
|
|
|
|
101
|
$number =~ s/(^\+678|\D)//g; |
99
|
16
|
|
|
|
|
100
|
my $self = bless({ country_code => '678', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
100
|
16
|
100
|
|
|
|
87
|
return $self->is_valid() ? $self : undef; |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
1; |