Template::TAL::Output - base class for Template::TAL output layers


Template-TAL documentation  | view source Contained in the Template-TAL distribution.

Index


NAME

Top

Template::TAL::Output - base class for Template::TAL output layers

SYNOPSIS

Top

  my $tt = Template::TAL->new( output => "Template::TAL::Output::XML" );
  print $tt->process('foo');

DESCRIPTION

Top

The render method of Template::TAL::Template produces a DOM tree. TT then gives that tree to its output class (in $tt->output) for conversion to a byte sequence. This class is the superclass of all Template::TAL output classes. By default, TT will use Template::TAL::Output::HTML, but you may want to use Template::TAL::Output::XML to produce XML output.

SUBCLASSING

Top

You only have to override the 'render' method, which should take an XML::LibXML::Document object, and return a byte sequence. Preferably, you should respect the 'charset' property of the instance (assuming that applies to your output method).

METHODS

Top

new()

Create a new instance of the output class.

charset

Get/set chained accessor that returns/sets the character set that the output will be encoded into. By default, this is 'utf-8'.

render( XML DOM )

returns a byte sequence representing the XML DOM passed.

COPYRIGHT

Top

BUGS

Top

None known. Please see Template::TAL for details of how to report bugs

SEE ALSO

Top

Template::TAL


Template-TAL documentation  | view source Contained in the Template-TAL distribution.