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