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