blib/lib/Number/Phone/StubCountry/MF.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/MC.pm ↑ Summary blib/lib/Number/Phone/StubCountry/MH.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::MF;
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.20260904101550;
26  
27 3 my $formatters = [];
28  
29 3 my $validators = {
30 'fixed_line' => '
31 (?:
32 59(?:
33 0(?:
34 0[079]|
35 [14]3|
36 [27][79]|
37 3[03-7]|
38 5[0-268]|
39 87
40 )|
41 87\\d
42 )|
43 80[6-9]\\d\\d
44 )\\d{4}
45 ',
46 'geographic' => '
47 (?:
48 59(?:
49 0(?:
50 0[079]|
51 [14]3|
52 [27][79]|
53 3[03-7]|
54 5[0-268]|
55 87
56 )|
57 87\\d
58 )|
59 80[6-9]\\d\\d
60 )\\d{4}
61 ',
62 'mobile' => '
63 (?:
64 69(?:
65 0\\d\\d|
66 1(?:
67 2[2-9]|
68 3[0-5]
69 )
70 )|
71 7090[0-4]
72 )\\d{4}
73 ',
74 'pager' => '',
75 'personal_number' => '',
76 'specialrate' => '(8[129]\\d{7})',
77 'toll_free' => '80[0-5]\\d{6}',
78 'voip' => '
79 9(?:
80 (?:
81 39[5-7]|
82 76[018]
83 )\\d|
84 475[0-6]
85 )\\d{4}
86 '
87 };
88 3 my $timezones = {
89 '' => [
90 'America/Guadeloupe'
91 ]
92 };
93  
94 12 ▶ sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
95 12 my $class = shift;
96 12 my $number = shift;
97 12 $number =~ s/(^\+590|\D)//g;
98 12 my $self = bless({ country_code => '590', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, }, $class);
99 12 ▶ return $self if ($self->is_valid());
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_valid 10 2 12
100 2 $number =~ s/^(?:0)//;
101 2 $self = bless({ country_code => '590', number => $number, formatters => $formatters, validators => $validators, }, $class);
102 2 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 0 2 2
103 }
104 3 1;
« blib/lib/Number/Phone/StubCountry/MC.pm ↑ Summary blib/lib/Number/Phone/StubCountry/MH.pm »