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