| 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::VU; | ||||||||||
| 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.20260904101552; | |||||||||
| 26 | |||||||||||
| 27 | 2 | my $formatters = [ | |||||||||
| 28 | { | ||||||||||
| 29 | 'format' => '$1 $2', | ||||||||||
| 30 | 'leading_digits' => '[57-9]', | ||||||||||
| 31 | 'pattern' => '(\\d{3})(\\d{4})' | ||||||||||
| 32 | } | ||||||||||
| 33 | ]; | ||||||||||
| 34 | |||||||||||
| 35 | 2 | 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[0-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 | 2 | my %areanames = (); | |||||||||
| 81 | 2 | $areanames{en} = {"67826", "Port\ Vila\,\ Shefa", | |||||||||
| 82 | "67827", "Port\ Vila\,\ Shefa", | ||||||||||
| 83 | "67825", "Port\ Vila\,\ Shefa", | ||||||||||
| 84 | "67888", "Tafea", | ||||||||||
| 85 | "67838", "Penama\/Torba", | ||||||||||
| 86 | "67836", "Sanma", | ||||||||||
| 87 | "67824", "Port\ Vila\,\ Shefa", | ||||||||||
| 88 | "67829", "Port\ Vila\,\ Shefa", | ||||||||||
| 89 | "67837", "Luganville", | ||||||||||
| 90 | "67822", "Port\ Vila\,\ Shefa", | ||||||||||
| 91 | "67823", "Port\ Vila\,\ Shefa", | ||||||||||
| 92 | "67828", "Port\ Vila\,\ Shefa", | ||||||||||
| 93 | "6784", "Malampa",}; | ||||||||||
| 94 | 2 | my $timezones = { | |||||||||
| 95 | '' => [ | ||||||||||
| 96 | 'Pacific/Efate' | ||||||||||
| 97 | ] | ||||||||||
| 98 | }; | ||||||||||
| 99 | |||||||||||
| 100 | 16 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 101 | 16 | my $class = shift; | |||||||||
| 102 | 16 | my $number = shift; | |||||||||
| 103 | 16 | $number =~ s/(^\+678|\D)//g; | |||||||||
| 104 | 16 | my $self = bless({ country_code => '678', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class); | |||||||||
| 105 | 16 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 106 | } | ||||||||||
| 107 | 2 | 1; | |||||||||