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::SI; |
20
|
2
|
|
|
2
|
|
1266
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
244
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
22
|
use strict; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
56
|
|
23
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
59
|
|
24
|
2
|
|
|
2
|
|
13
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174404; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
8[09]| |
32
|
|
|
|
|
|
|
9 |
33
|
|
|
|
|
|
|
', |
34
|
|
|
|
|
|
|
'national_rule' => '0$1', |
35
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3,6})' |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
{ |
38
|
|
|
|
|
|
|
'format' => '$1 $2', |
39
|
|
|
|
|
|
|
'leading_digits' => ' |
40
|
|
|
|
|
|
|
59| |
41
|
|
|
|
|
|
|
8 |
42
|
|
|
|
|
|
|
', |
43
|
|
|
|
|
|
|
'national_rule' => '0$1', |
44
|
|
|
|
|
|
|
'pattern' => '(\\d{3})(\\d{5})' |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
{ |
47
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
48
|
|
|
|
|
|
|
'leading_digits' => ' |
49
|
|
|
|
|
|
|
[37][01]| |
50
|
|
|
|
|
|
|
4[0139]| |
51
|
|
|
|
|
|
|
51| |
52
|
|
|
|
|
|
|
6 |
53
|
|
|
|
|
|
|
', |
54
|
|
|
|
|
|
|
'national_rule' => '0$1', |
55
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{3})(\\d{3})' |
56
|
|
|
|
|
|
|
}, |
57
|
|
|
|
|
|
|
{ |
58
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
59
|
|
|
|
|
|
|
'leading_digits' => '[1-57]', |
60
|
|
|
|
|
|
|
'national_rule' => '(0$1)', |
61
|
|
|
|
|
|
|
'pattern' => '(\\d)(\\d{3})(\\d{2})(\\d{2})' |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
]; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my $validators = { |
66
|
|
|
|
|
|
|
'fixed_line' => ' |
67
|
|
|
|
|
|
|
(?: |
68
|
|
|
|
|
|
|
[1-357][2-8]| |
69
|
|
|
|
|
|
|
4[24-8] |
70
|
|
|
|
|
|
|
)\\d{6} |
71
|
|
|
|
|
|
|
', |
72
|
|
|
|
|
|
|
'geographic' => ' |
73
|
|
|
|
|
|
|
(?: |
74
|
|
|
|
|
|
|
[1-357][2-8]| |
75
|
|
|
|
|
|
|
4[24-8] |
76
|
|
|
|
|
|
|
)\\d{6} |
77
|
|
|
|
|
|
|
', |
78
|
|
|
|
|
|
|
'mobile' => ' |
79
|
|
|
|
|
|
|
65(?: |
80
|
|
|
|
|
|
|
[178]\\d| |
81
|
|
|
|
|
|
|
5[56]| |
82
|
|
|
|
|
|
|
6[01] |
83
|
|
|
|
|
|
|
)\\d{4}| |
84
|
|
|
|
|
|
|
(?: |
85
|
|
|
|
|
|
|
[37][01]| |
86
|
|
|
|
|
|
|
4[0139]| |
87
|
|
|
|
|
|
|
51| |
88
|
|
|
|
|
|
|
6[489] |
89
|
|
|
|
|
|
|
)\\d{6} |
90
|
|
|
|
|
|
|
', |
91
|
|
|
|
|
|
|
'pager' => '', |
92
|
|
|
|
|
|
|
'personal_number' => '', |
93
|
|
|
|
|
|
|
'specialrate' => '( |
94
|
|
|
|
|
|
|
89[1-3]\\d{2,5}| |
95
|
|
|
|
|
|
|
90\\d{4,6} |
96
|
|
|
|
|
|
|
)', |
97
|
|
|
|
|
|
|
'toll_free' => '80\\d{4,6}', |
98
|
|
|
|
|
|
|
'voip' => ' |
99
|
|
|
|
|
|
|
(?: |
100
|
|
|
|
|
|
|
59\\d\\d| |
101
|
|
|
|
|
|
|
8(?: |
102
|
|
|
|
|
|
|
1(?: |
103
|
|
|
|
|
|
|
[67]\\d| |
104
|
|
|
|
|
|
|
8[0-589] |
105
|
|
|
|
|
|
|
)| |
106
|
|
|
|
|
|
|
2(?: |
107
|
|
|
|
|
|
|
0\\d| |
108
|
|
|
|
|
|
|
2[0-37-9]| |
109
|
|
|
|
|
|
|
8[0-2489] |
110
|
|
|
|
|
|
|
)| |
111
|
|
|
|
|
|
|
3[389]\\d |
112
|
|
|
|
|
|
|
) |
113
|
|
|
|
|
|
|
)\\d{4} |
114
|
|
|
|
|
|
|
' |
115
|
|
|
|
|
|
|
}; |
116
|
|
|
|
|
|
|
my %areanames = (); |
117
|
|
|
|
|
|
|
$areanames{en} = {"38656", "Gorica\/Koper\/Postojna", |
118
|
|
|
|
|
|
|
"38653", "Gorica\/Koper\/Postojna", |
119
|
|
|
|
|
|
|
"38677", "Novo\ Mesto\/Krško", |
120
|
|
|
|
|
|
|
"38632", "Celje\/Trbovlje", |
121
|
|
|
|
|
|
|
"3861", "Ljubljana", |
122
|
|
|
|
|
|
|
"38655", "Gorica\/Koper\/Postojna", |
123
|
|
|
|
|
|
|
"38654", "Gorica\/Koper\/Postojna", |
124
|
|
|
|
|
|
|
"38678", "Novo\ Mesto\/Krško", |
125
|
|
|
|
|
|
|
"38676", "Novo\ Mesto\/Krško", |
126
|
|
|
|
|
|
|
"38675", "Novo\ Mesto\/Krško", |
127
|
|
|
|
|
|
|
"38673", "Novo\ Mesto\/Krško", |
128
|
|
|
|
|
|
|
"38657", "Gorica\/Koper\/Postojna", |
129
|
|
|
|
|
|
|
"38658", "Gorica\/Koper\/Postojna", |
130
|
|
|
|
|
|
|
"38642", "Kranj", |
131
|
|
|
|
|
|
|
"38674", "Novo\ Mesto\/Krško", |
132
|
|
|
|
|
|
|
"3862", "Maribor\/Ravne\ na\ Koroškem\/Murska\ Sobota", |
133
|
|
|
|
|
|
|
"38647", "Kranj", |
134
|
|
|
|
|
|
|
"38634", "Celje\/Trbovlje", |
135
|
|
|
|
|
|
|
"38636", "Celje\/Trbovlje", |
136
|
|
|
|
|
|
|
"38652", "Gorica\/Koper\/Postojna", |
137
|
|
|
|
|
|
|
"38635", "Celje\/Trbovlje", |
138
|
|
|
|
|
|
|
"38648", "Kranj", |
139
|
|
|
|
|
|
|
"38633", "Celje\/Trbovlje", |
140
|
|
|
|
|
|
|
"38646", "Kranj", |
141
|
|
|
|
|
|
|
"38645", "Kranj", |
142
|
|
|
|
|
|
|
"38638", "Celje\/Trbovlje", |
143
|
|
|
|
|
|
|
"38637", "Celje\/Trbovlje", |
144
|
|
|
|
|
|
|
"38644", "Kranj", |
145
|
|
|
|
|
|
|
"38672", "Novo\ Mesto\/Krško",}; |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
sub new { |
148
|
16
|
|
|
16
|
1
|
32
|
my $class = shift; |
149
|
16
|
|
|
|
|
33
|
my $number = shift; |
150
|
16
|
|
|
|
|
100
|
$number =~ s/(^\+386|\D)//g; |
151
|
16
|
|
|
|
|
102
|
my $self = bless({ country_code => '386', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
152
|
16
|
100
|
|
|
|
85
|
return $self if ($self->is_valid()); |
153
|
1
|
|
|
|
|
4
|
$number =~ s/^(?:0)//; |
154
|
1
|
|
|
|
|
13
|
$self = bless({ country_code => '386', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
155
|
1
|
50
|
|
|
|
4
|
return $self->is_valid() ? $self : undef; |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
1; |