| 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::KW; | ||||||||||
| 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.20260904101550; | |||||||||
| 26 | |||||||||||
| 27 | 2 | my $formatters = [ | |||||||||
| 28 | { | ||||||||||
| 29 | 'format' => '$1 $2', | ||||||||||
| 30 | 'leading_digits' => ' | ||||||||||
| 31 | [169]| | ||||||||||
| 32 | 2(?: | ||||||||||
| 33 | [235]| | ||||||||||
| 34 | 4[1-35-9] | ||||||||||
| 35 | )| | ||||||||||
| 36 | 52 | ||||||||||
| 37 | ', | ||||||||||
| 38 | 'pattern' => '(\\d{4})(\\d{3,4})' | ||||||||||
| 39 | }, | ||||||||||
| 40 | { | ||||||||||
| 41 | 'format' => '$1 $2', | ||||||||||
| 42 | 'leading_digits' => '[245]', | ||||||||||
| 43 | 'pattern' => '(\\d{3})(\\d{5})' | ||||||||||
| 44 | } | ||||||||||
| 45 | ]; | ||||||||||
| 46 | |||||||||||
| 47 | 2 | my $validators = { | |||||||||
| 48 | 'fixed_line' => ' | ||||||||||
| 49 | 2(?: | ||||||||||
| 50 | [23]\\d\\d| | ||||||||||
| 51 | 4(?: | ||||||||||
| 52 | [1-35-9]\\d| | ||||||||||
| 53 | 44 | ||||||||||
| 54 | )| | ||||||||||
| 55 | 5(?: | ||||||||||
| 56 | 0[034]| | ||||||||||
| 57 | [2-46]\\d| | ||||||||||
| 58 | 5[1-3]| | ||||||||||
| 59 | 7[1-7] | ||||||||||
| 60 | ) | ||||||||||
| 61 | )\\d{4} | ||||||||||
| 62 | ', | ||||||||||
| 63 | 'geographic' => ' | ||||||||||
| 64 | 2(?: | ||||||||||
| 65 | [23]\\d\\d| | ||||||||||
| 66 | 4(?: | ||||||||||
| 67 | [1-35-9]\\d| | ||||||||||
| 68 | 44 | ||||||||||
| 69 | )| | ||||||||||
| 70 | 5(?: | ||||||||||
| 71 | 0[034]| | ||||||||||
| 72 | [2-46]\\d| | ||||||||||
| 73 | 5[1-3]| | ||||||||||
| 74 | 7[1-7] | ||||||||||
| 75 | ) | ||||||||||
| 76 | )\\d{4} | ||||||||||
| 77 | ', | ||||||||||
| 78 | 'mobile' => ' | ||||||||||
| 79 | (?: | ||||||||||
| 80 | 41\\d\\d| | ||||||||||
| 81 | 5(?: | ||||||||||
| 82 | (?: | ||||||||||
| 83 | [05]\\d| | ||||||||||
| 84 | 1[0-7]| | ||||||||||
| 85 | 6[56] | ||||||||||
| 86 | )\\d| | ||||||||||
| 87 | 2(?: | ||||||||||
| 88 | 22| | ||||||||||
| 89 | 5[25] | ||||||||||
| 90 | )| | ||||||||||
| 91 | 7(?: | ||||||||||
| 92 | 55| | ||||||||||
| 93 | 77 | ||||||||||
| 94 | )| | ||||||||||
| 95 | 88[58] | ||||||||||
| 96 | )| | ||||||||||
| 97 | 6(?: | ||||||||||
| 98 | (?: | ||||||||||
| 99 | 0[034679]| | ||||||||||
| 100 | 5[015-9]| | ||||||||||
| 101 | 6\\d | ||||||||||
| 102 | )\\d| | ||||||||||
| 103 | 1(?: | ||||||||||
| 104 | 00| | ||||||||||
| 105 | 11| | ||||||||||
| 106 | 6[16] | ||||||||||
| 107 | )| | ||||||||||
| 108 | 2[26]2| | ||||||||||
| 109 | 3[36]3| | ||||||||||
| 110 | 4[46]4| | ||||||||||
| 111 | 7(?: | ||||||||||
| 112 | 0[013-9]| | ||||||||||
| 113 | [67]\\d | ||||||||||
| 114 | )| | ||||||||||
| 115 | 8[68]8| | ||||||||||
| 116 | 9(?: | ||||||||||
| 117 | [069]\\d| | ||||||||||
| 118 | 3[039] | ||||||||||
| 119 | ) | ||||||||||
| 120 | )| | ||||||||||
| 121 | 9(?: | ||||||||||
| 122 | (?: | ||||||||||
| 123 | [04679]\\d| | ||||||||||
| 124 | 8[057-9] | ||||||||||
| 125 | )\\d| | ||||||||||
| 126 | 1(?: | ||||||||||
| 127 | 00| | ||||||||||
| 128 | 1[01]| | ||||||||||
| 129 | 99 | ||||||||||
| 130 | )| | ||||||||||
| 131 | 2(?: | ||||||||||
| 132 | 00| | ||||||||||
| 133 | 2\\d | ||||||||||
| 134 | )| | ||||||||||
| 135 | 3(?: | ||||||||||
| 136 | 00| | ||||||||||
| 137 | 3[03] | ||||||||||
| 138 | )| | ||||||||||
| 139 | 5(?: | ||||||||||
| 140 | 00| | ||||||||||
| 141 | 5\\d | ||||||||||
| 142 | ) | ||||||||||
| 143 | ) | ||||||||||
| 144 | )\\d{4} | ||||||||||
| 145 | ', | ||||||||||
| 146 | 'pager' => '', | ||||||||||
| 147 | 'personal_number' => '', | ||||||||||
| 148 | 'specialrate' => '', | ||||||||||
| 149 | 'toll_free' => '18\\d{5}', | ||||||||||
| 150 | 'voip' => '' | ||||||||||
| 151 | }; | ||||||||||
| 152 | 2 | my $timezones = { | |||||||||
| 153 | '' => [ | ||||||||||
| 154 | 'Asia/Kuwait' | ||||||||||
| 155 | ] | ||||||||||
| 156 | }; | ||||||||||
| 157 | |||||||||||
| 158 | 10 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 159 | 10 | my $class = shift; | |||||||||
| 160 | 10 | my $number = shift; | |||||||||
| 161 | 10 | $number =~ s/(^\+965|\D)//g; | |||||||||
| 162 | 10 | my $self = bless({ country_code => '965', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, }, $class); | |||||||||
| 163 | 10 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 164 | } | ||||||||||
| 165 | 2 | 1; | |||||||||