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
|
|
1168
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
250
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
47
|
|
23
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
54
|
|
24
|
2
|
|
|
2
|
|
11
|
use utf8; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
15
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230307181417; |
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} = {"2262098", "Bobo\-Dioulasso", |
93
|
|
|
|
|
|
|
"226253", "Ouagadougou", |
94
|
|
|
|
|
|
|
"2262090", "Gaoua", |
95
|
|
|
|
|
|
|
"2262096", "Orodara", |
96
|
|
|
|
|
|
|
"2262541", "Léo\/Sapouy", |
97
|
|
|
|
|
|
|
"2262455", "Ouahigouya", |
98
|
|
|
|
|
|
|
"2262471", "Tenkodogo", |
99
|
|
|
|
|
|
|
"2262446", "Falagountou\/Dori", |
100
|
|
|
|
|
|
|
"2262053", "Boromo\/Djibasso\/Nouna", |
101
|
|
|
|
|
|
|
"2262477", "Fada\/Diabo", |
102
|
|
|
|
|
|
|
"2262479", "Kantchari", |
103
|
|
|
|
|
|
|
"2262449", "Falagountou\/Dori", |
104
|
|
|
|
|
|
|
"226204", "Kaya", |
105
|
|
|
|
|
|
|
"2262456", "Djibo", |
106
|
|
|
|
|
|
|
"2262052", "Dédougou", |
107
|
|
|
|
|
|
|
"2262454", "Yako", |
108
|
|
|
|
|
|
|
"2262470", "Pouytenga\/Koupéla", |
109
|
|
|
|
|
|
|
"2262540", "Pô\/Kombissiri\/Koubri", |
110
|
|
|
|
|
|
|
"2262091", "Banfora", |
111
|
|
|
|
|
|
|
"2262099", "Béréba\/Fo\/Houndé", |
112
|
|
|
|
|
|
|
"2262445", "Kaya", |
113
|
|
|
|
|
|
|
"2262097", "Bobo\-Dioulasso", |
114
|
|
|
|
|
|
|
"226254", "Ouagadougou", |
115
|
|
|
|
|
|
|
"2262544", "Koudougou",}; |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
sub new { |
118
|
7
|
|
|
7
|
1
|
18
|
my $class = shift; |
119
|
7
|
|
|
|
|
14
|
my $number = shift; |
120
|
7
|
|
|
|
|
41
|
$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
|
|
|
|
34
|
return $self->is_valid() ? $self : undef; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
1; |