NAME

Top Close Open

Template:TT3::Element::Whitespace - base class element for ignorable whitespace

DESCRIPTION

Top Close Open

This module implements a subclass of Template::TT3::Element to represent ignorable whitespace. It acts as a base class for the Template::TT3::Element::Comment and Template::TT3::Element::TagStart element modules, among others.

METHODS

Top Close Open

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

skip_ws($token)

Top Close Open

An alias to the next_skip_ws() method inherited from the Template::TT3::Element base class.

skip_delimiter($token)

Top Close Open

This skips the $token pointer ahead to the next token following any whitespace and/or delimiters.

parse_expr($token,$scope,$precedence)

Top Close Open

This method skips over the whitespace token and any subsequent whitespace tokens, then calls parse_expr() on the next token. In effect, if you call parse_expr() on a whitespace token, it will automatically skip over the whitespace and return the next expression if there is one.

parse_body($token,$scope,$precedence)

Top Close Open

Like parse_expr() , this method skips over the whitespace token(s) and calls parse_body() on the next token.

parse_pair($token,$scope,$precedence)

Top Close Open

Like parse_body() and parse_expr() , this method skips over the whitespace token(s) and calls parse_pair() on the next token.

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_whitespace() method against the view object passed as the only argument, $view. It passes itself as an argument to the view_whitespace() 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 , 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::Comment and Template::TT3::Element::TagStart modules.


http://tt3.template-toolkit.org/docs/Template/TT3/Element/Whitespace.pm last modified 2009-12-23 13:54:29