TAL/Output/HTML.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
render
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 =head1 NAME
2  
3 Template::TAL::Output::HTML - output templates as HTML
4  
5 =head1 SYNOPSIS
6  
7 my $tt = Template::TAL->new( output => "Template::TAL::Output::HTML" );
8 print $tt->process('foo.tal');
9  
10 =head1 DESCRIPTION
11  
12 This is a Template::TAL output filter that produces HTML output, instead of
13 XML. It does nothing clever, I just use the toStringHTML function of
14 L<XML::LibXML>.
15  
16 =cut
17  
18 package Template::TAL::Output::HTML;
19 use warnings;
20 use strict;
21 use Carp qw( croak );
22 use base qw( Template::TAL::Output );
23 use Encode;
24  
25 sub render {
26 my ($self, $dom) = @_;
27 $dom->setEncoding( $self->charset );
28 return Encode::encode( $self->charset, $dom->toStringHTML() );
29 }
30  
31 =head1 COPYRIGHT
32  
33 Written by Tom Insam, Copyright 2005 Fotango Ltd. All Rights Reserved
34  
35 This program is free software; you can redistribute
36 it and/or modify it under the same terms as Perl itself.
37  
38 =cut
39  
40 1;