NAME

Top Close Open

Template:TT3::Element::Keyword - base class for keyword elements

DESCRIPTION

Top Close Open

This module implements a subclass of Template::TT3::Element . It acts as a base class for all keyword elements.

METHODS

Top Close Open

This module implements the following methods in addition to those inherited from the Template::TT3::Element::Literal , Template::TT3::Element , Template::TT3::Base and Badger::Base base classes.

parse_word()

Top Close Open

This method is called when a keyword appears in a position where a non-keyword word is expected. It downgrades (re-blesses) the keyword element to a word object and then calls its parse_word() method, inherited from the Template::TT3::Element base class.

In summary, if you ask a keyword to be a word then it silently becomes one.

parse_dotop($token)

Top Close Open

This method is called when a keyword appears immediately after a dot operator. It downgrades (re-blesses) the keyword element to a word object and then calls its parse_dotop() method.

view($view)

Top Close Open

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_keyword() method against the view object passed as the only argument, $view. It passes itself as an argument to the view_keyword() method.

AUTHOR

Top Close Open

Andy Wardley http://wardley.org

COPYRIGHT

Top Close Open

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.

SEE ALSO

Top Close Open

This module inherits methods from the 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.


http://tt3.template-toolkit.org/docs/Template/TT3/Element/Keyword.pm last modified 2009-12-21 18:32:16