| 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::TJ; | ||||||||||
| 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 $3', | ||||||||||
| 30 | 'leading_digits' => '3317', | ||||||||||
| 31 | 'pattern' => '(\\d{6})(\\d)(\\d{2})' | ||||||||||
| 32 | }, | ||||||||||
| 33 | { | ||||||||||
| 34 | 'format' => '$1 $2 $3', | ||||||||||
| 35 | 'leading_digits' => ' | ||||||||||
| 36 | 44[02-479]| | ||||||||||
| 37 | [34]7 | ||||||||||
| 38 | ', | ||||||||||
| 39 | 'pattern' => '(\\d{3})(\\d{2})(\\d{4})' | ||||||||||
| 40 | }, | ||||||||||
| 41 | { | ||||||||||
| 42 | 'format' => '$1 $2 $3', | ||||||||||
| 43 | 'leading_digits' => ' | ||||||||||
| 44 | 3(?: | ||||||||||
| 45 | [1245]| | ||||||||||
| 46 | 3[12] | ||||||||||
| 47 | ) | ||||||||||
| 48 | ', | ||||||||||
| 49 | 'pattern' => '(\\d{4})(\\d)(\\d{4})' | ||||||||||
| 50 | }, | ||||||||||
| 51 | { | ||||||||||
| 52 | 'format' => '$1 $2 $3', | ||||||||||
| 53 | 'leading_digits' => '\\d', | ||||||||||
| 54 | 'pattern' => '(\\d{2})(\\d{3})(\\d{4})' | ||||||||||
| 55 | } | ||||||||||
| 56 | ]; | ||||||||||
| 57 | |||||||||||
| 58 | 2 | my $validators = { | |||||||||
| 59 | 'fixed_line' => ' | ||||||||||
| 60 | (?: | ||||||||||
| 61 | 3(?: | ||||||||||
| 62 | 1[3-5]| | ||||||||||
| 63 | 2[245]| | ||||||||||
| 64 | 3[12]| | ||||||||||
| 65 | 4[24-7]| | ||||||||||
| 66 | 5[25]| | ||||||||||
| 67 | 72 | ||||||||||
| 68 | )| | ||||||||||
| 69 | 4(?: | ||||||||||
| 70 | 46| | ||||||||||
| 71 | 74| | ||||||||||
| 72 | 87 | ||||||||||
| 73 | ) | ||||||||||
| 74 | )\\d{6} | ||||||||||
| 75 | ', | ||||||||||
| 76 | 'geographic' => ' | ||||||||||
| 77 | (?: | ||||||||||
| 78 | 3(?: | ||||||||||
| 79 | 1[3-5]| | ||||||||||
| 80 | 2[245]| | ||||||||||
| 81 | 3[12]| | ||||||||||
| 82 | 4[24-7]| | ||||||||||
| 83 | 5[25]| | ||||||||||
| 84 | 72 | ||||||||||
| 85 | )| | ||||||||||
| 86 | 4(?: | ||||||||||
| 87 | 46| | ||||||||||
| 88 | 74| | ||||||||||
| 89 | 87 | ||||||||||
| 90 | ) | ||||||||||
| 91 | )\\d{6} | ||||||||||
| 92 | ', | ||||||||||
| 93 | 'mobile' => ' | ||||||||||
| 94 | (?: | ||||||||||
| 95 | 33[03-9]| | ||||||||||
| 96 | 4(?: | ||||||||||
| 97 | 1[18]| | ||||||||||
| 98 | 4[02-479] | ||||||||||
| 99 | )| | ||||||||||
| 100 | 81[1-9] | ||||||||||
| 101 | )\\d{6}| | ||||||||||
| 102 | (?: | ||||||||||
| 103 | [09]\\d| | ||||||||||
| 104 | 1[0-27-9]| | ||||||||||
| 105 | 2[0-27]| | ||||||||||
| 106 | 3[08]| | ||||||||||
| 107 | 40| | ||||||||||
| 108 | 5[05]| | ||||||||||
| 109 | 66| | ||||||||||
| 110 | 7[0157-9]| | ||||||||||
| 111 | 8[07-9] | ||||||||||
| 112 | )\\d{7} | ||||||||||
| 113 | ', | ||||||||||
| 114 | 'pager' => '', | ||||||||||
| 115 | 'personal_number' => '', | ||||||||||
| 116 | 'specialrate' => '', | ||||||||||
| 117 | 'toll_free' => '', | ||||||||||
| 118 | 'voip' => '' | ||||||||||
| 119 | }; | ||||||||||
| 120 | 2 | my %areanames = (); | |||||||||
| 121 | 2 | $areanames{en} = {"9923556", "Rushan", | |||||||||
| 122 | "9923452", "Zafarabad", | ||||||||||
| 123 | "9923249", "Kumsangir", | ||||||||||
| 124 | "9923462", "Isfara", | ||||||||||
| 125 | "9923445", "Matchinskiy", | ||||||||||
| 126 | "9923245", "Bokhtar", | ||||||||||
| 127 | "9923132", "Jirgital", | ||||||||||
| 128 | "9923130", "Tursun\-Zade", | ||||||||||
| 129 | "9923252", "Panj", | ||||||||||
| 130 | "9923250", "Sarband", | ||||||||||
| 131 | "9923522", "Khorog", | ||||||||||
| 132 | "9923141", "Yavan", | ||||||||||
| 133 | "9923453", "Asht", | ||||||||||
| 134 | "9923551", "Vanj", | ||||||||||
| 135 | "9923248", "Djilikul", | ||||||||||
| 136 | "9923312", "Dangara", | ||||||||||
| 137 | "9923133", "Nurobod", | ||||||||||
| 138 | "9923222", "Kurgan\-Tube", | ||||||||||
| 139 | "9923137", "Rudaki", | ||||||||||
| 140 | "9923451", "Chkalovsk", | ||||||||||
| 141 | "9923154", "Tadjikabad", | ||||||||||
| 142 | "9923316", "Parkhar", | ||||||||||
| 143 | "9923322", "Kulyab", | ||||||||||
| 144 | "9923251", "Kabodion", | ||||||||||
| 145 | "9923553", "Ishkashim", | ||||||||||
| 146 | "99237", "Dushanbe", | ||||||||||
| 147 | "9923131", "Rasht", | ||||||||||
| 148 | "9923467", "Kanibadam", | ||||||||||
| 149 | "9923422", "Khujand", | ||||||||||
| 150 | "9923136", "Vakhdat", | ||||||||||
| 151 | "9923155", "Shakhrinav", | ||||||||||
| 152 | "9923456", "Shakhristan", | ||||||||||
| 153 | "9923552", "Darvaz", | ||||||||||
| 154 | "9923311", "Vose", | ||||||||||
| 155 | "9923479", "Ayni", | ||||||||||
| 156 | "9923554", "Murgab", | ||||||||||
| 157 | "9923153", "Varzob", | ||||||||||
| 158 | "9923247", "Kolkhozabad", | ||||||||||
| 159 | "9923475", "Pendjikent", | ||||||||||
| 160 | "9923441", "Spitamen", | ||||||||||
| 161 | "9923555", "Roshtkala", | ||||||||||
| 162 | "9923246", "Vakhsh", | ||||||||||
| 163 | "9923135", "Fayzabad", | ||||||||||
| 164 | "9923318", "Muminobod", | ||||||||||
| 165 | "9923314", "Temurmalik", | ||||||||||
| 166 | "9923240", "Shaartuz", | ||||||||||
| 167 | "9923242", "Khuroson", | ||||||||||
| 168 | "9923156", "Tavildara", | ||||||||||
| 169 | "9923455", "Jabarrasulov", | ||||||||||
| 170 | "9923139", "Hissar", | ||||||||||
| 171 | "9923465", "Taboshar", | ||||||||||
| 172 | "992331700", "Khovaling", | ||||||||||
| 173 | "9923442", "Gafurov", | ||||||||||
| 174 | "9923138", "Nurek", | ||||||||||
| 175 | "9923315", "M\.\ Khamadoni", | ||||||||||
| 176 | "9923134", "Rogun", | ||||||||||
| 177 | "9923243", "Abdurakhmana\ Jami", | ||||||||||
| 178 | "9923443", "Kayrakum", | ||||||||||
| 179 | "9923454", "Istravshan", | ||||||||||
| 180 | "9923464", "Ganchi",}; | ||||||||||
| 181 | 2 | my $timezones = { | |||||||||
| 182 | '' => [ | ||||||||||
| 183 | 'Asia/Dushanbe' | ||||||||||
| 184 | ] | ||||||||||
| 185 | }; | ||||||||||
| 186 | |||||||||||
| 187 | 7 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 188 | 7 | my $class = shift; | |||||||||
| 189 | 7 | my $number = shift; | |||||||||
| 190 | 7 | $number =~ s/(^\+992|\D)//g; | |||||||||
| 191 | 7 | my $self = bless({ country_code => '992', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class); | |||||||||
| 192 | 7 | ▶ | return $self->is_valid() ? $self : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 193 | } | ||||||||||
| 194 | 2 | 1; | |||||||||