line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::XML::Unescape; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
345746
|
$Template::Plugin::XML::Unescape::VERSION = '0.02'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: unescape XML entities in Template Toolkit |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
9
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use base qw(Template::Plugin::Filter); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
1188
|
|
12
|
1
|
|
|
1
|
|
3813
|
use HTML::Entities; |
|
1
|
|
|
|
|
333616
|
|
|
1
|
|
|
|
|
339
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub init { |
15
|
2
|
|
|
2
|
0
|
202
|
my $self = shift; |
16
|
2
|
|
100
|
|
|
27
|
my $name = $self->{_ARGS}->[0] || 'xml_unescape'; |
17
|
2
|
|
|
|
|
13
|
$self->install_filter($name); |
18
|
2
|
|
|
|
|
79
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
0
|
153
|
sub filter { decode_entities($_[1]) } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |