line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Filter::PhoneToNumeric; |
2
|
2
|
|
|
2
|
|
1186
|
use strict; use utf8; use warnings FATAL => 'all'; |
|
2
|
|
|
2
|
|
4
|
|
|
2
|
|
|
2
|
|
48
|
|
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
48
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
73
|
|
3
|
2
|
|
|
2
|
|
9
|
use parent 'DTL::Fast::Filter'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
$DTL::Fast::FILTER_HANDLERS{'phone2numeric'} = __PACKAGE__; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our %CHARMAP = qw( |
8
|
|
|
|
|
|
|
A 2 B 2 C 2 |
9
|
|
|
|
|
|
|
D 3 E 3 F 3 |
10
|
|
|
|
|
|
|
G 4 H 4 I 4 |
11
|
|
|
|
|
|
|
J 5 K 5 L 5 |
12
|
|
|
|
|
|
|
M 6 N 6 O 6 |
13
|
|
|
|
|
|
|
P 7 Q 7 R 7 S 7 |
14
|
|
|
|
|
|
|
T 8 U 8 V 8 |
15
|
|
|
|
|
|
|
W 9 X 9 Y 9 Z 9 |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
#@Override |
19
|
|
|
|
|
|
|
sub filter |
20
|
|
|
|
|
|
|
{ |
21
|
2
|
|
|
2
|
0
|
3
|
shift; # self |
22
|
2
|
|
|
|
|
2
|
shift; # filter_manager |
23
|
2
|
|
|
|
|
3
|
my $value = shift; |
24
|
2
|
|
|
|
|
16
|
$value =~ s/([A-Z])/$CHARMAP{$1}/gs; |
25
|
2
|
|
|
|
|
9
|
return $value; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |