line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of Number-Phone-Formatter-EPP |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This software is copyright (c) 2016 by Michael Schout. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under |
7
|
|
|
|
|
|
|
# the same terms as the Perl 5 programming language system itself. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
package Number::Phone::Formatter::EPP; |
10
|
|
|
|
|
|
|
$Number::Phone::Formatter::EPP::VERSION = '0.07'; |
11
|
|
|
|
|
|
|
# ABSTRACT: An EPP formatter for Number::Phone |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
13595
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
84
|
|
14
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
190
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub format { |
18
|
6
|
|
|
6
|
1
|
555643
|
my ($class, $number) = @_; |
19
|
|
|
|
|
|
|
|
20
|
6
|
|
|
|
|
50
|
my ($code, $subscriber) = split /\s+/, $number, 2; |
21
|
|
|
|
|
|
|
|
22
|
6
|
|
|
|
|
33
|
$code =~ s/\D+//g; |
23
|
6
|
|
|
|
|
29
|
$subscriber =~ s/\D+//g; |
24
|
|
|
|
|
|
|
|
25
|
6
|
|
|
|
|
42
|
return "+${code}.${subscriber}"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |