blib/lib/Number/Phone/StubCountry/GF.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/FR.pm ↑ Summary blib/lib/Number/Phone/StubCountry/GP.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::GF;
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.20260904101549;
26  
27 2 my $formatters = [
28 {
29 'format' => '$1 $2 $3 $4',
30 'leading_digits' => '
31 [5-7]|
32 80[6-9]|
33 9[47]
34 ',
35 'national_rule' => '0$1',
36 'pattern' => '(\\d{3})(\\d{2})(\\d{2})(\\d{2})'
37 },
38 {
39 'format' => '$1 $2 $3 $4',
40 'leading_digits' => '[89]',
41 'national_rule' => '0$1',
42 'pattern' => '(\\d{3})(\\d{2})(\\d{2})(\\d{2})'
43 }
44 ];
45  
46 2 my $validators = {
47 'fixed_line' => '
48 (?:
49 59(?:
50 4(?:
51 [02-49]\\d|
52 1[0-5]|
53 5[6-9]|
54 6[0-3]|
55 80
56 )|
57 88\\d
58 )|
59 80[6-9]\\d\\d
60 )\\d{4}
61 ',
62 'geographic' => '
63 (?:
64 59(?:
65 4(?:
66 [02-49]\\d|
67 1[0-5]|
68 5[6-9]|
69 6[0-3]|
70 80
71 )|
72 88\\d
73 )|
74 80[6-9]\\d\\d
75 )\\d{4}
76 ',
77 'mobile' => '
78 (?:
79 694(?:
80 [0-249]\\d|
81 3[0-8]
82 )|
83 7093[0-3]
84 )\\d{4}
85 ',
86 'pager' => '',
87 'personal_number' => '',
88 'specialrate' => '(8[129]\\d{7})',
89 'toll_free' => '80[0-5]\\d{6}',
90 'voip' => '
91 9(?:
92 (?:
93 396|
94 76\\d
95 )\\d|
96 476[0-6]
97 )\\d{4}
98 '
99 };
100 2 my $timezones = {
101 '' => [
102 'America/Cayenne'
103 ]
104 };
105  
106 16 ▶ sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
107 16 my $class = shift;
108 16 my $number = shift;
109 16 $number =~ s/(^\+594|\D)//g;
110 16 my $self = bless({ country_code => '594', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, }, $class);
111 16 ▶ return $self if ($self->is_valid());
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_valid 15 1 16
112 1 $number =~ s/^(?:0)//;
113 1 $self = bless({ country_code => '594', number => $number, formatters => $formatters, validators => $validators, }, $class);
114 1 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 0 1 1
115 }
116 2 1;
« blib/lib/Number/Phone/StubCountry/FR.pm ↑ Summary blib/lib/Number/Phone/StubCountry/GP.pm »