This module implements a subclass of Template::TT3::Element to represent quoted text strings. It acts as a common base class for the Template::TT3::Element::Squote and Template::TT3::Element::Dquote elements used to represent 'single' and "double" quoted strings, respectively.
This module implements the following methods in addition to those inherited from the Template::TT3::Element::Text , Template::TT3::Element::Literal , Template::TT3::Element , Template::TT3::Base and Badger::Base base classes.
This method is called to parse a string as an expression.
This method is called to parse a string as a filename. It is defined as an alias to parse_expr() .
This method returns the content of the quote string (i.e. not including the
quote marks) stored in the EXPR
slot. Subclasses may redefine this method
to perform additional processing of the string content (e.g. double quoted
strings which may have embedded variable references).
This method is a thin wrapper around the text() method. It is called when a quoted string is used as a filename.
This method fetches the template from the the $context
object passed as
an argument, using its own
text()
value as the identifier.
This method returns the string content (as returned by the text() method) as a variable object.
This method is called by a
Template::TT3::View
object as part of the double
dispatch process that is used to render views of template elements. It calls
the view_string()
method against the view object passed as the only
argument, $view
. It passes itself as an argument to the view_string()
method.
The following constant method is defined:
This defines a sprintf()
format string of "%s"
(note that the quotes
are part of the format). This is used by the
source()
method inherited from
Template::TT3::Element::Literal
to render a canonical representation
of the template source code for this element.
Andy Wardley http://wardley.org
Copyright (C) 1996-2009 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This module inherits methods from the Template::TT3::Element::Text , Template::TT3::Element::Literal , Template::TT3::Element , Template::TT3::Base and Badger::Base base classes.
It is constructed using the Template::TT3::Class::Element class metaprogramming module.
It is itself the base class for the Template::TT3::Element::Padding and Template::TT3::Element::String modules.