Martyn Smith > Template-HTML-0.01 > Template::HTML::Variable

Download:
Template-HTML-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Template::HTML::Variable - An "pretend" string that auto HTML encodes

SYNOPSIS ^

  use Template::HTML::Variable;

  my $string = Template::HTML::Variable->new('< test & stuff >');

  print $string, "\n";

  # Produces output "&lt; test &amp; stuff &gt;"

DESCRIPTION ^

This object provides a "pretend" string to use as part of the Template::HTML Template Toolkit extension.

It automatically stringifies to an HTML encoded version of what it was created with, all the while trying to keep a sane state through string concatinations etc.

SEE ALSO ^

http://git.dollyfish.net.nz/?p=Template-HTML

FUNCTIONS ^

new()

Takes a single argument which is the string to set this variable to

plain()

Returns a non HTML-encoded version of the string (i.e. exactly what was passed to the new() function

html_encoded()

Returns an HTML encoded version of the string (used by the stringify overloads)

concat()

Implementation of overloaded . operator

concatequals()

Implementation of overloaded .= operator

clone()

Returns a clone of this variable. (used for the implementation of the overloaded = operator).

AUTHOR ^

Martyn Smith, <msmith@cpan.org>

COPYTIGHT AND LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.