line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# automatically generated file, don't edit |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# Copyright 2023 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::BF; |
20
|
2
|
|
|
2
|
|
1288
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
268
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
18
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
52
|
|
23
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
58
|
|
24
|
2
|
|
|
2
|
|
14
|
use utf8; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
15
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174401; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3 $4', |
30
|
|
|
|
|
|
|
'leading_digits' => '[025-7]', |
31
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{2})(\\d{2})(\\d{2})' |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
]; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $validators = { |
36
|
|
|
|
|
|
|
'fixed_line' => ' |
37
|
|
|
|
|
|
|
2(?: |
38
|
|
|
|
|
|
|
0(?: |
39
|
|
|
|
|
|
|
49| |
40
|
|
|
|
|
|
|
5[23]| |
41
|
|
|
|
|
|
|
6[5-7]| |
42
|
|
|
|
|
|
|
9[016-9] |
43
|
|
|
|
|
|
|
)| |
44
|
|
|
|
|
|
|
4(?: |
45
|
|
|
|
|
|
|
4[569]| |
46
|
|
|
|
|
|
|
5[4-6]| |
47
|
|
|
|
|
|
|
6[5-7]| |
48
|
|
|
|
|
|
|
7[0179] |
49
|
|
|
|
|
|
|
)| |
50
|
|
|
|
|
|
|
5(?: |
51
|
|
|
|
|
|
|
[34]\\d| |
52
|
|
|
|
|
|
|
50| |
53
|
|
|
|
|
|
|
6[5-7] |
54
|
|
|
|
|
|
|
) |
55
|
|
|
|
|
|
|
)\\d{4} |
56
|
|
|
|
|
|
|
', |
57
|
|
|
|
|
|
|
'geographic' => ' |
58
|
|
|
|
|
|
|
2(?: |
59
|
|
|
|
|
|
|
0(?: |
60
|
|
|
|
|
|
|
49| |
61
|
|
|
|
|
|
|
5[23]| |
62
|
|
|
|
|
|
|
6[5-7]| |
63
|
|
|
|
|
|
|
9[016-9] |
64
|
|
|
|
|
|
|
)| |
65
|
|
|
|
|
|
|
4(?: |
66
|
|
|
|
|
|
|
4[569]| |
67
|
|
|
|
|
|
|
5[4-6]| |
68
|
|
|
|
|
|
|
6[5-7]| |
69
|
|
|
|
|
|
|
7[0179] |
70
|
|
|
|
|
|
|
)| |
71
|
|
|
|
|
|
|
5(?: |
72
|
|
|
|
|
|
|
[34]\\d| |
73
|
|
|
|
|
|
|
50| |
74
|
|
|
|
|
|
|
6[5-7] |
75
|
|
|
|
|
|
|
) |
76
|
|
|
|
|
|
|
)\\d{4} |
77
|
|
|
|
|
|
|
', |
78
|
|
|
|
|
|
|
'mobile' => ' |
79
|
|
|
|
|
|
|
(?: |
80
|
|
|
|
|
|
|
0[1-35-7]| |
81
|
|
|
|
|
|
|
5[1-8]| |
82
|
|
|
|
|
|
|
[67]\\d |
83
|
|
|
|
|
|
|
)\\d{6} |
84
|
|
|
|
|
|
|
', |
85
|
|
|
|
|
|
|
'pager' => '', |
86
|
|
|
|
|
|
|
'personal_number' => '', |
87
|
|
|
|
|
|
|
'specialrate' => '', |
88
|
|
|
|
|
|
|
'toll_free' => '', |
89
|
|
|
|
|
|
|
'voip' => '' |
90
|
|
|
|
|
|
|
}; |
91
|
|
|
|
|
|
|
my %areanames = (); |
92
|
|
|
|
|
|
|
$areanames{en} = {"2262446", "Falagountou\/Dori", |
93
|
|
|
|
|
|
|
"2262456", "Djibo", |
94
|
|
|
|
|
|
|
"226204", "Kaya", |
95
|
|
|
|
|
|
|
"2262477", "Fada\/Diabo", |
96
|
|
|
|
|
|
|
"2262053", "Boromo\/Djibasso\/Nouna", |
97
|
|
|
|
|
|
|
"2262090", "Gaoua", |
98
|
|
|
|
|
|
|
"2262540", "Pô\/Kombissiri\/Koubri", |
99
|
|
|
|
|
|
|
"2262470", "Pouytenga\/Koupéla", |
100
|
|
|
|
|
|
|
"2262096", "Orodara", |
101
|
|
|
|
|
|
|
"2262455", "Ouahigouya", |
102
|
|
|
|
|
|
|
"2262445", "Kaya", |
103
|
|
|
|
|
|
|
"2262097", "Bobo\-Dioulasso", |
104
|
|
|
|
|
|
|
"226254", "Ouagadougou", |
105
|
|
|
|
|
|
|
"2262544", "Koudougou", |
106
|
|
|
|
|
|
|
"2262479", "Kantchari", |
107
|
|
|
|
|
|
|
"2262052", "Dédougou", |
108
|
|
|
|
|
|
|
"2262091", "Banfora", |
109
|
|
|
|
|
|
|
"2262449", "Falagountou\/Dori", |
110
|
|
|
|
|
|
|
"2262454", "Yako", |
111
|
|
|
|
|
|
|
"226253", "Ouagadougou", |
112
|
|
|
|
|
|
|
"2262541", "Léo\/Sapouy", |
113
|
|
|
|
|
|
|
"2262471", "Tenkodogo", |
114
|
|
|
|
|
|
|
"2262099", "Béréba\/Fo\/Houndé", |
115
|
|
|
|
|
|
|
"2262098", "Bobo\-Dioulasso",}; |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
sub new { |
118
|
7
|
|
|
7
|
1
|
20
|
my $class = shift; |
119
|
7
|
|
|
|
|
11
|
my $number = shift; |
120
|
7
|
|
|
|
|
45
|
$number =~ s/(^\+226|\D)//g; |
121
|
7
|
|
|
|
|
39
|
my $self = bless({ country_code => '226', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
122
|
7
|
100
|
|
|
|
42
|
return $self->is_valid() ? $self : undef; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
1; |