| 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::PW; | ||||||||||
| 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.20260904101551; | |||||||||
| 26 | |||||||||||
| 27 | 2 | my $formatters = [ | |||||||||
| 28 | { | ||||||||||
| 29 | 'format' => '$1 $2', | ||||||||||
| 30 | 'leading_digits' => '[2-9]', | ||||||||||
| 31 | 'pattern' => '(\\d{3})(\\d{4})' | ||||||||||
| 32 | } | ||||||||||
| 33 | ]; | ||||||||||
| 34 | |||||||||||
| 35 | 2 | my $validators = { | |||||||||
| 36 | 'fixed_line' => ' | ||||||||||
| 37 | (?: | ||||||||||
| 38 | 2(?: | ||||||||||
| 39 | 55| | ||||||||||
| 40 | 77 | ||||||||||
| 41 | )| | ||||||||||
| 42 | 345| | ||||||||||
| 43 | 488| | ||||||||||
| 44 | 5(?: | ||||||||||
| 45 | 35| | ||||||||||
| 46 | 44| | ||||||||||
| 47 | 87 | ||||||||||
| 48 | )| | ||||||||||
| 49 | 6(?: | ||||||||||
| 50 | 22| | ||||||||||
| 51 | 54| | ||||||||||
| 52 | 79 | ||||||||||
| 53 | )| | ||||||||||
| 54 | 7(?: | ||||||||||
| 55 | 33| | ||||||||||
| 56 | 47 | ||||||||||
| 57 | )| | ||||||||||
| 58 | 8(?: | ||||||||||
| 59 | 24| | ||||||||||
| 60 | 55| | ||||||||||
| 61 | 76 | ||||||||||
| 62 | )| | ||||||||||
| 63 | 900 | ||||||||||
| 64 | )\\d{4} | ||||||||||
| 65 | ', | ||||||||||
| 66 | 'geographic' => ' | ||||||||||
| 67 | (?: | ||||||||||
| 68 | 2(?: | ||||||||||
| 69 | 55| | ||||||||||
| 70 | 77 | ||||||||||
| 71 | )| | ||||||||||
| 72 | 345| | ||||||||||
| 73 | 488| | ||||||||||
| 74 | 5(?: | ||||||||||
| 75 | 35| | ||||||||||
| 76 | 44| | ||||||||||
| 77 | 87 | ||||||||||
| 78 | )| | ||||||||||
| 79 | 6(?: | ||||||||||
| 80 | 22| | ||||||||||
| 81 | 54| | ||||||||||
| 82 | 79 | ||||||||||
| 83 | )| | ||||||||||
| 84 | 7(?: | ||||||||||
| 85 | 33| | ||||||||||
| 86 | 47 | ||||||||||
| 87 | )| | ||||||||||
| 88 | 8(?: | ||||||||||
| 89 | 24| | ||||||||||
| 90 | 55| | ||||||||||
| 91 | 76 | ||||||||||
| 92 | )| | ||||||||||
| 93 | 900 | ||||||||||
| 94 | )\\d{4} | ||||||||||
| 95 | ', | ||||||||||
| 96 | 'mobile' => ' | ||||||||||
| 97 | (?: | ||||||||||
| 98 | (?: | ||||||||||
| 99 | 46| | ||||||||||
| 100 | 83 | ||||||||||
| 101 | )[0-5]| | ||||||||||
| 102 | (?: | ||||||||||
| 103 | 6[2-4689]| | ||||||||||
| 104 | 78 | ||||||||||
| 105 | )0 | ||||||||||
| 106 | )\\d{4}| | ||||||||||
| 107 | (?: | ||||||||||
| 108 | 45| | ||||||||||
| 109 | 77| | ||||||||||
| 110 | 88 | ||||||||||
| 111 | )\\d{5} | ||||||||||
| 112 | ', | ||||||||||
| 113 | 'pager' => '', | ||||||||||
| 114 | 'personal_number' => '', | ||||||||||
| 115 | 'specialrate' => '', | ||||||||||
| 116 | 'toll_free' => '', | ||||||||||
| 117 | 'voip' => '' | ||||||||||
| 118 | }; | ||||||||||
| 119 | 2 | my %areanames = (); | |||||||||
| 120 | 2 | $areanames{en} = {"68025", "Sonsorol\ State\ and\ Hatohobei\ State", | |||||||||
| 121 | "68082", "Ngaraard\ State", | ||||||||||
| 122 | "68067", "Ngiwal\ State", | ||||||||||
| 123 | "68065", "Melekeok\ State", | ||||||||||
| 124 | "68048", "Koror\ State", | ||||||||||
| 125 | "68027", "Angaur\ State", | ||||||||||
| 126 | "68085", "Ngarchelong\ State", | ||||||||||
| 127 | "68058", "Airai\ State", | ||||||||||
| 128 | "680622", "Ngchesar\ State", | ||||||||||
| 129 | "68053", "Ngatpang\ State", | ||||||||||
| 130 | "68074", "Ngardmau\ State", | ||||||||||
| 131 | "68054", "Aimeliik\ State", | ||||||||||
| 132 | "68073", "Ngaremlengui\ State", | ||||||||||
| 133 | "68087", "Kayangel\ State", | ||||||||||
| 134 | "6803", "Peleliu\ State",}; | ||||||||||
| 135 | 2 | my $timezones = { | |||||||||
| 136 | '' => [ | ||||||||||
| 137 | 'Pacific/Palau' | ||||||||||
| 138 | ] | ||||||||||
| 139 | }; | ||||||||||
| 140 | |||||||||||
| 141 | 7 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 142 | 7 | my $class = shift; | |||||||||
| 143 | 7 | my $number = shift; | |||||||||
| 144 | 7 | $number =~ s/(^\+680|\D)//g; | |||||||||
| 145 | 7 | my $self = bless({ country_code => '680', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class); | |||||||||
| 146 | 7 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 147 | } | ||||||||||
| 148 | 2 | 1; | |||||||||