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::GL; |
20
|
2
|
|
|
2
|
|
1209
|
use base qw(Number::Phone::StubCountry); |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
233
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
15
|
use strict; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
50
|
|
23
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
55
|
|
24
|
2
|
|
|
2
|
|
14
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
25
|
|
|
|
|
|
|
our $VERSION = 1.20230614174403; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $formatters = [ |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'format' => '$1 $2 $3', |
30
|
|
|
|
|
|
|
'leading_digits' => ' |
31
|
|
|
|
|
|
|
19| |
32
|
|
|
|
|
|
|
[2-9] |
33
|
|
|
|
|
|
|
', |
34
|
|
|
|
|
|
|
'pattern' => '(\\d{2})(\\d{2})(\\d{2})' |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
]; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $validators = { |
39
|
|
|
|
|
|
|
'fixed_line' => ' |
40
|
|
|
|
|
|
|
(?: |
41
|
|
|
|
|
|
|
19| |
42
|
|
|
|
|
|
|
3[1-7]| |
43
|
|
|
|
|
|
|
6[14689]| |
44
|
|
|
|
|
|
|
70| |
45
|
|
|
|
|
|
|
8[14-79]| |
46
|
|
|
|
|
|
|
9\\d |
47
|
|
|
|
|
|
|
)\\d{4} |
48
|
|
|
|
|
|
|
', |
49
|
|
|
|
|
|
|
'geographic' => ' |
50
|
|
|
|
|
|
|
(?: |
51
|
|
|
|
|
|
|
19| |
52
|
|
|
|
|
|
|
3[1-7]| |
53
|
|
|
|
|
|
|
6[14689]| |
54
|
|
|
|
|
|
|
70| |
55
|
|
|
|
|
|
|
8[14-79]| |
56
|
|
|
|
|
|
|
9\\d |
57
|
|
|
|
|
|
|
)\\d{4} |
58
|
|
|
|
|
|
|
', |
59
|
|
|
|
|
|
|
'mobile' => '[245]\\d{5}', |
60
|
|
|
|
|
|
|
'pager' => '', |
61
|
|
|
|
|
|
|
'personal_number' => '', |
62
|
|
|
|
|
|
|
'specialrate' => '', |
63
|
|
|
|
|
|
|
'toll_free' => '80\\d{4}', |
64
|
|
|
|
|
|
|
'voip' => '3[89]\\d{4}' |
65
|
|
|
|
|
|
|
}; |
66
|
|
|
|
|
|
|
my %areanames = (); |
67
|
|
|
|
|
|
|
$areanames{en} = {"29994", "Ilulissat", |
68
|
|
|
|
|
|
|
"29989", "Aasiaat", |
69
|
|
|
|
|
|
|
"29995", "Uummannaq", |
70
|
|
|
|
|
|
|
"29996", "Upernavik", |
71
|
|
|
|
|
|
|
"29931", "Nuuk", |
72
|
|
|
|
|
|
|
"29981", "Maniitsoq", |
73
|
|
|
|
|
|
|
"29998", "Tasiilaq", |
74
|
|
|
|
|
|
|
"29932", "Nuuk", |
75
|
|
|
|
|
|
|
"29997", "Qaanaaq", |
76
|
|
|
|
|
|
|
"29961", "Nanortalik", |
77
|
|
|
|
|
|
|
"299691", "Ivittuut", |
78
|
|
|
|
|
|
|
"29992", "Qeqertasuaq", |
79
|
|
|
|
|
|
|
"29991", "Qasigannguit", |
80
|
|
|
|
|
|
|
"29968", "Paamiut", |
81
|
|
|
|
|
|
|
"29987", "Kangaatsiaq", |
82
|
|
|
|
|
|
|
"29966", "Narsaq", |
83
|
|
|
|
|
|
|
"29984", "Kangerlussuaq", |
84
|
|
|
|
|
|
|
"29999", "Ittoqqortoormiit", |
85
|
|
|
|
|
|
|
"29934", "Nuuk", |
86
|
|
|
|
|
|
|
"29986", "Sisimiut", |
87
|
|
|
|
|
|
|
"29936", "Nuuk", |
88
|
|
|
|
|
|
|
"29964", "Qaqortoq", |
89
|
|
|
|
|
|
|
"29933", "Nuuk", |
90
|
|
|
|
|
|
|
"29985", "Sisimiut", |
91
|
|
|
|
|
|
|
"29935", "Nuuk",}; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub new { |
94
|
13
|
|
|
13
|
1
|
38
|
my $class = shift; |
95
|
13
|
|
|
|
|
38
|
my $number = shift; |
96
|
13
|
|
|
|
|
79
|
$number =~ s/(^\+299|\D)//g; |
97
|
13
|
|
|
|
|
91
|
my $self = bless({ country_code => '299', number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class); |
98
|
13
|
100
|
|
|
|
79
|
return $self->is_valid() ? $self : undef; |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
1; |