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