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

filter: Statementstmt 97.0% 33 / 34 Branchbran 66.6% 4 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 93.6% 44 / 47 CC 4 SCAR 8.6
CC
4
Cov
92%
new
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.4
« blib/lib/Number/Phone/StubCountry/CX.pm ↑ Summary blib/lib/Number/Phone/StubCountry/MG.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::GA;
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' => '[2-7]',
31 'national_rule' => '0$1',
32 'pattern' => '(\\d)(\\d{2})(\\d{2})(\\d{2})'
33 },
34 {
35 'format' => '$1 $2 $3 $4',
36 'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})'
37 },
38 {
39 'format' => '$1 $2 $3 $4',
40 'leading_digits' => '
41 11|
42 [67]
43 ',
44 'national_rule' => '0$1',
45 'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})'
46 }
47 ];
48  
49 2 my $validators = {
50 'fixed_line' => '[01]1\\d{6}',
51 'geographic' => '[01]1\\d{6}',
52 'mobile' => '
53 (?:
54 (?:
55 0[2-7]|
56 7[467]
57 )\\d|
58 6(?:
59 0[0-4]|
60 10|
61 [256]\\d
62 )
63 )\\d{5}|
64 [2-7]\\d{6}
65 ',
66 'pager' => '',
67 'personal_number' => '',
68 'specialrate' => '',
69 'toll_free' => '',
70 'voip' => ''
71 };
72 2 my %areanames = ();
73 2 $areanames{en} = {"2411167", "Franceville",
74 "2410155", "Port\-Gentil",
75 "2410140", "Kango",
76 "2410165", "Koulamoutou",
77 "2410159", "Ndjolé",
78 "2410198", "Oyem",
79 "2411196", "Bitam",
80 "24101420", "Ntoum",
81 "2410169", "Léconi\/Akiéni\/Okondja",
82 "2411182", "Tchibanga",
83 "2410154", "Omboué",
84 "2411156", "Port\-Gentil",
85 "2410158", "Lambaréné",
86 "2410164", "Lastoursville",
87 "2411166", "Moanda",
88 "2411183", "Mayumba",
89 "2411193", "Booué",
90 "2411162", "Mounana",
91 "2411160", "Ngouoni",
92 "2411145", "Libreville",
93 "2410147", "Libreville",
94 "2411150", "Gamba",
95 "24101424", "Cocobeach",
96 "2411186", "Mouila",
97 "2411192", "Mékambo",
98 "2411190", "Makokou",
99 "241117", "Libreville",
100 "2411144", "Libreville",
101 "2410146", "Libreville",
102 "2411148", "Libreville",
103 "2411165", "Koulamoutou",
104 "2411140", "Kango",
105 "2411155", "Port\-Gentil",
106 "2410167", "Franceville",
107 "2411169", "Léconi\/Akiéni\/Okondja",
108 "2410182", "Tchibanga",
109 "24111420", "Ntoum",
110 "2410196", "Bitam",
111 "2411198", "Oyem",
112 "2411159", "Ndjolé",
113 "2410166", "Moanda",
114 "2411164", "Lastoursville",
115 "2411158", "Lambaréné",
116 "2410156", "Port\-Gentil",
117 "2411154", "Omboué",
118 "2410183", "Mayumba",
119 "2410193", "Booué",
120 "24111424", "Cocobeach",
121 "2410150", "Gamba",
122 "2411147", "Libreville",
123 "2410145", "Libreville",
124 "2410160", "Ngouoni",
125 "2410162", "Mounana",
126 "241017", "Libreville",
127 "2410192", "Mékambo",
128 "2410190", "Makokou",
129 "2410186", "Mouila",
130 "2410148", "Libreville",
131 "2410144", "Libreville",
132 "2411146", "Libreville",};
133 2 my $timezones = {
134 '' => [
135 'Africa/Libreville'
136 ]
137 };
138  
139 7 ▶ sub new {
Subroutine new: called CC=4 SCAR=14.0
Pod documented
140 7 my $class = shift;
141 7 my $number = shift;
142 7 $number =~ s/(^\+241|\D)//g;
143 7 my $self = bless({ country_code => '241', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
144 7 ▶ return $self if ($self->is_valid());
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_valid 6 1 7
145 1 my $prefix = qr/^(?:0(11\d{6}|60\d{6}|61\d{6}|6[256]\d{6}|7[467]\d{6}))/;
146 1 my @matches = $number =~ /$prefix/;
147 1 ▶ if (defined $matches[-1]) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $matches[-1]) { } 0 1 1
148 2 ▶ no warnings 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
149 0 $number =~ s/$prefix/$1/;
150 }
151 else {
152 1 $number =~ s/$prefix//;
153 }
154 1 $self = bless({ country_code => '241', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
155 1 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 0 1 1
156 }
157 2 1;
« blib/lib/Number/Phone/StubCountry/CX.pm ↑ Summary blib/lib/Number/Phone/StubCountry/MG.pm »