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