blib/lib/Number/Phone/StubCountry/LI.pm

filter: Statementstmt 100% 25 / 25 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 97.1% 34 / 35 CC 3 SCAR 6.2
CC
3
Cov
97%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« blib/lib/Number/Phone/StubCountry/LA.pm ↑ Summary blib/lib/Number/Phone/StubCountry/LR.pm »
1 # automatically generated file, don't edit
2  
3  
4  
5 # Copyright 2026 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::LI;
20 2 ▶use base qw(Number::Phone::StubCountry);
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 our $VERSION = 1.20260904101550;
26  
27 2 my $formatters = [
28 {
29 'format' => '$1 $2 $3',
30 'leading_digits' => '
31 [2379]|
32 8(?:
33 0(?:
34 02|
35 9
36 )|
37 7
38 )
39 ',
40 'pattern' => '(\\d{3})(\\d{2})(\\d{2})'
41 },
42 {
43 'format' => '$1 $2 $3',
44 'leading_digits' => '8',
45 'pattern' => '(\\d{3})(\\d{3})(\\d{3})'
46 },
47 {
48 'format' => '$1 $2 $3',
49 'leading_digits' => '69',
50 'pattern' => '(\\d{2})(\\d{3})(\\d{4})'
51 },
52 {
53 'format' => '$1 $2 $3',
54 'leading_digits' => '6',
55 'pattern' => '(\\d{3})(\\d{3})(\\d{3})'
56 }
57 ];
58  
59 2 my $validators = {
60 'fixed_line' => '
61 (?:
62 2(?:
63 01|
64 1[27]|
65 2[024]|
66 3\\d|
67 6[02-578]|
68 96
69 )|
70 3(?:
71 [24]0|
72 33|
73 7[0135-7]|
74 8[048]|
75 9[0269]
76 )
77 )\\d{4}
78 ',
79 'geographic' => '
80 (?:
81 2(?:
82 01|
83 1[27]|
84 2[024]|
85 3\\d|
86 6[02-578]|
87 96
88 )|
89 3(?:
90 [24]0|
91 33|
92 7[0135-7]|
93 8[048]|
94 9[0269]
95 )
96 )\\d{4}
97 ',
98 'mobile' => '
99 (?:
100 6(?:
101 (?:
102 4[5-9]|
103 5\\d
104 )\\d|
105 6(?:
106 [024-68]\\d|
107 1[01]|
108 3[7-9]|
109 7[02]
110 )
111 )\\d|
112 7(?:
113 [37-9]\\d|
114 42|
115 56
116 )
117 )\\d{4}
118 ',
119 'pager' => '',
120 'personal_number' => '',
121 'specialrate' => '(
122 90(?:
123 02[258]|
124 1(?:
125 23|
126 3[14]
127 )|
128 66[136]
129 )\\d\\d
130 )|(
131 870(?:
132 28|
133 87
134 )\\d\\d
135 )',
136 'toll_free' => '
137 8002[28]\\d\\d|
138 80(?:
139 05\\d|
140 9
141 )\\d{4}
142 ',
143 'voip' => ''
144 };
145 2 my $timezones = {
146 '' => [
147 'Europe/Vaduz'
148 ]
149 };
150  
151 16 ▶ sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
152 16 my $class = shift;
153 16 my $number = shift;
154 16 $number =~ s/(^\+423|\D)//g;
155 16 my $self = bless({ country_code => '423', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, }, $class);
156 16 ▶ return $self if ($self->is_valid());
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_valid 15 1 16
157 1 $number =~ s/^(?:(1001)|0)//;
158 1 $self = bless({ country_code => '423', number => $number, formatters => $formatters, validators => $validators, }, $class);
159 1 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 0 1 1
160 }
161 2 1;
« blib/lib/Number/Phone/StubCountry/LA.pm ↑ Summary blib/lib/Number/Phone/StubCountry/LR.pm »