| 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::YE; | ||||||||||
| 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 $3', | ||||||||||
| 30 | 'leading_digits' => ' | ||||||||||
| 31 | [1-6]| | ||||||||||
| 32 | 7(?: | ||||||||||
| 33 | [24-6]| | ||||||||||
| 34 | 8[0-7] | ||||||||||
| 35 | ) | ||||||||||
| 36 | ', | ||||||||||
| 37 | 'national_rule' => '0$1', | ||||||||||
| 38 | 'pattern' => '(\\d)(\\d{3})(\\d{3,4})' | ||||||||||
| 39 | }, | ||||||||||
| 40 | { | ||||||||||
| 41 | 'format' => '$1 $2 $3', | ||||||||||
| 42 | 'leading_digits' => '7', | ||||||||||
| 43 | 'national_rule' => '0$1', | ||||||||||
| 44 | 'pattern' => '(\\d{3})(\\d{3})(\\d{3})' | ||||||||||
| 45 | } | ||||||||||
| 46 | ]; | ||||||||||
| 47 | |||||||||||
| 48 | 2 | my $validators = { | |||||||||
| 49 | 'fixed_line' => ' | ||||||||||
| 50 | 78[0-7]\\d{4}| | ||||||||||
| 51 | 17\\d{6}| | ||||||||||
| 52 | (?: | ||||||||||
| 53 | [12][2-68]| | ||||||||||
| 54 | 3[2358]| | ||||||||||
| 55 | 4[2-58]| | ||||||||||
| 56 | 5[2-6]| | ||||||||||
| 57 | 6[3-58]| | ||||||||||
| 58 | 7[24-6] | ||||||||||
| 59 | )\\d{5} | ||||||||||
| 60 | ', | ||||||||||
| 61 | 'geographic' => ' | ||||||||||
| 62 | 78[0-7]\\d{4}| | ||||||||||
| 63 | 17\\d{6}| | ||||||||||
| 64 | (?: | ||||||||||
| 65 | [12][2-68]| | ||||||||||
| 66 | 3[2358]| | ||||||||||
| 67 | 4[2-58]| | ||||||||||
| 68 | 5[2-6]| | ||||||||||
| 69 | 6[3-58]| | ||||||||||
| 70 | 7[24-6] | ||||||||||
| 71 | )\\d{5} | ||||||||||
| 72 | ', | ||||||||||
| 73 | 'mobile' => '7[01378]\\d{7}', | ||||||||||
| 74 | 'pager' => '', | ||||||||||
| 75 | 'personal_number' => '', | ||||||||||
| 76 | 'specialrate' => '', | ||||||||||
| 77 | 'toll_free' => '', | ||||||||||
| 78 | 'voip' => '' | ||||||||||
| 79 | }; | ||||||||||
| 80 | 2 | my %areanames = (); | |||||||||
| 81 | 2 | $areanames{en} = {"967684", "Dhamar", | |||||||||
| 82 | "96764", "Dhamar", | ||||||||||
| 83 | "967282", "Aden", | ||||||||||
| 84 | "9673", "Hodaidah", | ||||||||||
| 85 | "9677876", "Amran", | ||||||||||
| 86 | "9677845", "Al\ Mahweet", | ||||||||||
| 87 | "9677871", "Hajjah", | ||||||||||
| 88 | "96755", "Hadhrmout", | ||||||||||
| 89 | "967654", "Al\ Baidha", | ||||||||||
| 90 | "967633", "Maareb", | ||||||||||
| 91 | "967485", "Ibb", | ||||||||||
| 92 | "967566", "Soqatrah", | ||||||||||
| 93 | "9677877", "Amran", | ||||||||||
| 94 | "967280", "Aden", | ||||||||||
| 95 | "967286", "Abyan", | ||||||||||
| 96 | "96752", "Shabwah", | ||||||||||
| 97 | "967634", "Aljawf", | ||||||||||
| 98 | "9677873", "Hajjah", | ||||||||||
| 99 | "967285", "Lahj", | ||||||||||
| 100 | "96753", "Hadhrmout", | ||||||||||
| 101 | "967786", "Amran", | ||||||||||
| 102 | "9676868", "Al\ Baidha", | ||||||||||
| 103 | "9671", "Sanaa", | ||||||||||
| 104 | "9676864", "Dhamar", | ||||||||||
| 105 | "967785", "Saadah", | ||||||||||
| 106 | "967653", "Al\ Baidha", | ||||||||||
| 107 | "96754", "Hadhrmout", | ||||||||||
| 108 | "96776", "Amran", | ||||||||||
| 109 | "9676869", "Al\ Baidha", | ||||||||||
| 110 | "9677872", "Hajjah", | ||||||||||
| 111 | "9677870", "Hajjah", | ||||||||||
| 112 | "967281", "Aden", | ||||||||||
| 113 | "96726", "Abyan", | ||||||||||
| 114 | "9676865", "Dhamar", | ||||||||||
| 115 | "967683", "Maareb", | ||||||||||
| 116 | "96723", "Aden", | ||||||||||
| 117 | "967650", "Dhamar", | ||||||||||
| 118 | "96774", "Al\ Mahweet", | ||||||||||
| 119 | "967682", "Dhamar", | ||||||||||
| 120 | "9676853", "Al\ Baidha", | ||||||||||
| 121 | "9676863", "Maareb", | ||||||||||
| 122 | "96722", "Aden", | ||||||||||
| 123 | "9674842", "Taiz", | ||||||||||
| 124 | "9674840", "Taiz", | ||||||||||
| 125 | "96724", "Dhalea", | ||||||||||
| 126 | "967636", "Maareb", | ||||||||||
| 127 | "967483", "Taiz", | ||||||||||
| 128 | "967284", "Dhalea", | ||||||||||
| 129 | "9677874", "Al\ Mahweet", | ||||||||||
| 130 | "96745", "Ibb", | ||||||||||
| 131 | "9677878", "Saadah", | ||||||||||
| 132 | "96772", "Hajjah", | ||||||||||
| 133 | "9676860", "Al\ Baidha", | ||||||||||
| 134 | "9676862", "Al\ Baidha", | ||||||||||
| 135 | "967652", "Al\ Baidha", | ||||||||||
| 136 | "9677879", "Al\ Mahweet", | ||||||||||
| 137 | "967639", "Dhamar", | ||||||||||
| 138 | "9676850", "Al\ Baidha", | ||||||||||
| 139 | "967657", "Al\ Baidha", | ||||||||||
| 140 | "9674843", "Taiz", | ||||||||||
| 141 | "9677875", "Saadah", | ||||||||||
| 142 | "967651", "Dhamar", | ||||||||||
| 143 | "967433", "Ibb", | ||||||||||
| 144 | "9676866", "Dhamar", | ||||||||||
| 145 | "9674841", "Taiz", | ||||||||||
| 146 | "967638", "Maareb", | ||||||||||
| 147 | "9672840", "Aden", | ||||||||||
| 148 | "96744", "Ibb", | ||||||||||
| 149 | "967283", "Aden", | ||||||||||
| 150 | "967484", "Ibb", | ||||||||||
| 151 | "96725", "Lahj", | ||||||||||
| 152 | "9676861", "Dhamar", | ||||||||||
| 153 | "967630", "Maareb", | ||||||||||
| 154 | "96743", "Taiz", | ||||||||||
| 155 | "9676867", "Dhamar", | ||||||||||
| 156 | "967655", "Al\ Baidha", | ||||||||||
| 157 | "96775", "Saadah", | ||||||||||
| 158 | "967656", "Al\ Baidha", | ||||||||||
| 159 | "96742", "Taiz",}; | ||||||||||
| 160 | 2 | my $timezones = { | |||||||||
| 161 | '' => [ | ||||||||||
| 162 | 'Asia/Aden' | ||||||||||
| 163 | ] | ||||||||||
| 164 | }; | ||||||||||
| 165 | |||||||||||
| 166 | 7 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 167 | 7 | my $class = shift; | |||||||||
| 168 | 7 | my $number = shift; | |||||||||
| 169 | 7 | $number =~ s/(^\+967|\D)//g; | |||||||||
| 170 | 7 | my $self = bless({ country_code => '967', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class); | |||||||||
| 171 | 7 | ▶ | return $self if ($self->is_valid()); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 172 | 1 | $number =~ s/^(?:0)//; | |||||||||
| 173 | 1 | $self = bless({ country_code => '967', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); | |||||||||
| 174 | 1 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 175 | } | ||||||||||
| 176 | 2 | 1; | |||||||||