line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Filter::PhoneToNumeric; |
2
|
2
|
|
|
2
|
|
859
|
use strict; use utf8; use warnings FATAL => 'all'; |
|
2
|
|
|
2
|
|
3
|
|
|
2
|
|
|
2
|
|
55
|
|
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
48
|
|
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
61
|
|
3
|
2
|
|
|
2
|
|
6
|
use parent 'DTL::Fast::Filter'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
8
|
|
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
|
2
|
shift; # self |
22
|
2
|
|
|
|
|
2
|
shift; # filter_manager |
23
|
2
|
|
|
|
|
2
|
my $value = shift; |
24
|
2
|
|
|
|
|
14
|
$value =~ s/([A-Z])/$CHARMAP{$1}/gs; |
25
|
2
|
|
|
|
|
6
|
return $value; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |