| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Template::Plugin::Decode; |
|
2
|
1
|
|
|
1
|
|
700
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
30
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
28
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
32
|
use 5.008001; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
42
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Template::Plugin::Filter; |
|
8
|
1
|
|
|
1
|
|
5
|
use base qw(Template::Plugin::Filter); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
879
|
|
|
9
|
1
|
|
|
1
|
|
6736
|
use vars qw($VERSION $DYNAMIC $FILTER_NAME); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
170
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = 0.02; |
|
12
|
|
|
|
|
|
|
$DYNAMIC = 0; |
|
13
|
|
|
|
|
|
|
$FILTER_NAME = 'decode'; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub init { |
|
16
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
17
|
0
|
|
|
|
|
|
my $args = shift; |
|
18
|
0
|
|
0
|
|
|
|
my $name = $self->{_ARGS}->[0] || $FILTER_NAME; |
|
19
|
0
|
|
|
|
|
|
$self->install_filter($name); |
|
20
|
0
|
|
|
|
|
|
return $self; |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub filter { |
|
24
|
0
|
|
|
0
|
0
|
|
my($self, $text) = @_; |
|
25
|
0
|
0
|
|
|
|
|
utf8::decode($text) unless utf8::is_utf8($text); |
|
26
|
0
|
|
|
|
|
|
return $text; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
|
30
|
|
|
|
|
|
|
__END__ |