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
|
|
1179
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
230
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
56
|
|
23
|
2
|
|
|
2
|
|
22
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
57
|
|
24
|
2
|
|
|
2
|
|
13
|
use utf8; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
14
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230903131448; |
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} = {"38632", "Celje\/Trbovlje", |
118
|
|
|
|
|
|
|
"38633", "Celje\/Trbovlje", |
119
|
|
|
|
|
|
|
"38638", "Celje\/Trbovlje", |
120
|
|
|
|
|
|
|
"38636", "Celje\/Trbovlje", |
121
|
|
|
|
|
|
|
"38634", "Celje\/Trbovlje", |
122
|
|
|
|
|
|
|
"38655", "Gorica\/Koper\/Postojna", |
123
|
|
|
|
|
|
|
"38675", "Novo\ Mesto\/Krško", |
124
|
|
|
|
|
|
|
"38645", "Kranj", |
125
|
|
|
|
|
|
|
"38637", "Celje\/Trbovlje", |
126
|
|
|
|
|
|
|
"38672", "Novo\ Mesto\/Krško", |
127
|
|
|
|
|
|
|
"38642", "Kranj", |
128
|
|
|
|
|
|
|
"38673", "Novo\ Mesto\/Krško", |
129
|
|
|
|
|
|
|
"38656", "Gorica\/Koper\/Postojna", |
130
|
|
|
|
|
|
|
"38658", "Gorica\/Koper\/Postojna", |
131
|
|
|
|
|
|
|
"38676", "Novo\ Mesto\/Krško", |
132
|
|
|
|
|
|
|
"38646", "Kranj", |
133
|
|
|
|
|
|
|
"38648", "Kranj", |
134
|
|
|
|
|
|
|
"3862", "Maribor\/Ravne\ na\ Koroškem\/Murska\ Sobota", |
135
|
|
|
|
|
|
|
"38678", "Novo\ Mesto\/Krško", |
136
|
|
|
|
|
|
|
"38653", "Gorica\/Koper\/Postojna", |
137
|
|
|
|
|
|
|
"38652", "Gorica\/Koper\/Postojna", |
138
|
|
|
|
|
|
|
"38657", "Gorica\/Koper\/Postojna", |
139
|
|
|
|
|
|
|
"38674", "Novo\ Mesto\/Krško", |
140
|
|
|
|
|
|
|
"38644", "Kranj", |
141
|
|
|
|
|
|
|
"38635", "Celje\/Trbovlje", |
142
|
|
|
|
|
|
|
"38647", "Kranj", |
143
|
|
|
|
|
|
|
"38677", "Novo\ Mesto\/Krško", |
144
|
|
|
|
|
|
|
"38654", "Gorica\/Koper\/Postojna", |
145
|
|
|
|
|
|
|
"3861", "Ljubljana",}; |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
sub new { |
148
|
16
|
|
|
16
|
1
|
41
|
my $class = shift; |
149
|
16
|
|
|
|
|
30
|
my $number = shift; |
150
|
16
|
|
|
|
|
108
|
$number =~ s/(^\+386|\D)//g; |
151
|
16
|
|
|
|
|
98
|
my $self = bless({ country_code => '386', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
152
|
16
|
100
|
|
|
|
86
|
return $self if ($self->is_valid()); |
153
|
1
|
|
|
|
|
2
|
$number =~ s/^(?:0)//; |
154
|
1
|
|
|
|
|
11
|
$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; |