line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FormValidator::LazyWay::Filter::Encode; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
67
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
52
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
1106
|
use Encode (); |
|
2
|
|
|
|
|
12120
|
|
|
2
|
|
|
|
|
262
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub decode { |
9
|
2
|
|
|
2
|
0
|
3
|
my $text = shift; |
10
|
2
|
|
100
|
|
|
11
|
my $args = shift || { encoding => 'utf8' }; |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
|
|
12
|
Encode::decode($args->{encoding}, $text); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub encode_to { |
16
|
0
|
|
|
0
|
0
|
|
my $text = shift; |
17
|
0
|
|
0
|
|
|
|
my $args = shift || { encoding => 'utf8' }; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
Encode::encode($args->{encoding}, $text); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |