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