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

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 32 / 32 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/BN.pm ↑ Summary blib/lib/Number/Phone/StubCountry/BT.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::BQ;
20 4 ▶use base qw(Number::Phone::StubCountry);
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 4 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 4 our $VERSION = 1.20260904101547;
26  
27 4 my $formatters = [];
28  
29 4 my $validators = {
30 'fixed_line' => '
31 (?:
32 318[023]|
33 41(?:
34 6[023]|
35 70
36 )|
37 7(?:
38 1[578]|
39 2[05]|
40 50
41 )\\d
42 )\\d{3}
43 ',
44 'geographic' => '
45 (?:
46 318[023]|
47 41(?:
48 6[023]|
49 70
50 )|
51 7(?:
52 1[578]|
53 2[05]|
54 50
55 )\\d
56 )\\d{3}
57 ',
58 'mobile' => '
59 (?:
60 31(?:
61 8[14-8]|
62 9[14578]
63 )|
64 416[14-9]|
65 7(?:
66 0[01]|
67 7[07]|
68 8\\d|
69 9[056]
70 )\\d
71 )\\d{3}
72 ',
73 'pager' => '',
74 'personal_number' => '',
75 'specialrate' => '',
76 'toll_free' => '',
77 'voip' => ''
78 };
79 4 my %areanames = ();
80 4 $areanames{en} = {"599417", "Saba",
81 "5993182", "St\.\ Eustatius",
82 "5993180", "St\.\ Eustatius",
83 "5993183", "St\.\ Eustatius",
84 "59972", "Bonaire",
85 "59971", "Bonaire",
86 "59975", "Bonaire",
87 "5994163", "Saba",
88 "5994160", "Saba",
89 "5994162", "Saba",};
90 4 my $timezones = {
91 '' => [
92 'America/Curacao',
93 'America/Kralendijk'
94 ],
95 '3' => [
96 'America/Kralendijk'
97 ],
98 '4' => [
99 'America/Kralendijk'
100 ],
101 '6' => [
102 'America/Curacao'
103 ],
104 '7' => [
105 'America/Kralendijk'
106 ],
107 '9' => [
108 'America/Curacao'
109 ]
110 };
111  
112 21 ▶ sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
113 21 my $class = shift;
114 21 my $number = shift;
115 21 $number =~ s/(^\+599|\D)//g;
116 21 my $self = bless({ country_code => '599', number => $number, formatters => $formatters, validators => $validators, timezones => $timezones, areanames => \%areanames}, $class);
117 21 ▶ return $self->is_valid() ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->is_valid ? : 14 7 21
118 }
119 4 1;
« blib/lib/Number/Phone/StubCountry/BN.pm ↑ Summary blib/lib/Number/Phone/StubCountry/BT.pm »