line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::UTF8toANSI; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
715
|
use 5.006; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $FILTER_NAME = 'utf8_to_ansi'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
945
|
use Template::Plugin::Filter; |
|
1
|
|
|
|
|
24288
|
|
|
1
|
|
|
|
|
43
|
|
11
|
1
|
|
|
1
|
|
15
|
use base qw( Template::Plugin::Filter ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
114
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
442
|
use Unicode::String qw(utf8 latin1); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub init { |
17
|
|
|
|
|
|
|
my $self = shift; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$self->install_filter($FILTER_NAME); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub filter { |
25
|
|
|
|
|
|
|
my ($self, $text) = @_; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
$text = latin1( utf8( $text ) ); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return $text; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |