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

filter: Statementstmt 100% 22 / 22 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 30 / 30 CC 2 SCAR 2.9
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/Number/Phone/StubCountry/DJ.pm ↑ Summary blib/lib/Number/Phone/StubCountry/EE.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::DK;
20 3 ▶use base qw(Number::Phone::StubCountry);
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 3 our $VERSION = 1.20260904101549;
26  
27 3 my $formatters = [
28 {
29 'format' => '$1 $2 $3 $4',
30 'leading_digits' => '[2-9]',
31 'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})'
32 }
33 ];
34  
35 3 my $validators = {
36 'fixed_line' => '
37 (?:
38 2(?:
39 [0-59][1-9]|
40 [6-8]\\d
41 )|
42 3(?:
43 [0-3][1-9]|
44 4[13]|
45 5[1-58]|
46 6[1347-9]|
47 7\\d|
48 8[1-8]|
49 9[1-79]
50 )|
51 4(?:
52 [0-25][1-9]|
53 [34][2-9]|
54 6[13-579]|
55 7[13579]|
56 8[1-47]|
57 9[127]
58 )|
59 5(?:
60 [0-36][1-9]|
61 4[146-9]|
62 5[3-57-9]|
63 7[568]|
64 8[1-358]|
65 9[1-69]
66 )|
67 6(?:
68 [0135][1-9]|
69 2[1-68]|
70 4[2-8]|
71 6[1689]|
72 [78]\\d|
73 9[15689]
74 )|
75 7(?:
76 [0-69][1-9]|
77 7[3-9]|
78 8[147]
79 )|
80 8(?:
81 [16-9][1-9]|
82 2[1-58]
83 )|
84 9(?:
85 [1-47-9][1-9]|
86 6\\d
87 )
88 )\\d{5}
89 ',
90 'geographic' => '
91 (?:
92 2(?:
93 [0-59][1-9]|
94 [6-8]\\d
95 )|
96 3(?:
97 [0-3][1-9]|
98 4[13]|
99 5[1-58]|
100 6[1347-9]|
101 7\\d|
102 8[1-8]|
103 9[1-79]
104 )|
105 4(?:
106 [0-25][1-9]|
107 [34][2-9]|
108 6[13-579]|
109 7[13579]|
110 8[1-47]|
111 9[127]
112 )|
113 5(?:
114 [0-36][1-9]|
115 4[146-9]|
116 5[3-57-9]|
117 7[568]|
118 8[1-358]|
119 9[1-69]
120 )|
121 6(?:
122 [0135][1-9]|
123 2[1-68]|
124 4[2-8]|
125 6[1689]|
126 [78]\\d|
127 9[15689]
128 )|
129 7(?:
130 [0-69][1-9]|
131 7[3-9]|
132 8[147]
133 )|
134 8(?:
135 [16-9][1-9]|
136 2[1-58]
137 )|
138 9(?:
139 [1-47-9][1-9]|
140 6\\d
141 )
142 )\\d{5}
143 ',
144 'mobile' => '
145 (?:
146 2[6-8]|
147 37|
148 6[78]|
149 96
150 )\\d{6}|
151 (?:
152 2[0-59]|
153 3[0-689]|
154 [457]\\d|
155 6[0-69]|
156 8[126-9]|
157 9[1-47-9]
158 )[1-9]\\d{5}
159 ',
160 'pager' => '',
161 'personal_number' => '',
162 'specialrate' => '(90\\d{6})',
163 'toll_free' => '80\\d{6}',
164 'voip' => ''
165 };
166 3 my $timezones = {
167 '' => [
168 'Europe/Copenhagen'
169 ]
170 };
171  
172 15 ▶ sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
173 15 my $class = shift;
174 15 my $number = shift;
175 15 $number =~ s/(^\+45|\D)//g;
176 15 my $self = bless({ country_code => '45', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, }, $class);
177 15 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 14 1 15
178 }
179 3 1;
« blib/lib/Number/Phone/StubCountry/DJ.pm ↑ Summary blib/lib/Number/Phone/StubCountry/EE.pm »