NAME

Top Close Open

Template:TT3::Element::Filename - element representing a filename-like path

DESCRIPTION

Top Close Open

This module implements a subclass of Template::TT3::Element used to represent filenames.

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, and the Template::TT3::Element::Role::Filename mix-in role.

parse_filename($token)

Top Close Open

This method is called when an element appears where a filename is expected. It concatenates the text of any other filename tokens that follow immediately after it and stores it internally.

filename()

Top Close Open

This method returns the filename parsed by parse_filename() .

text()

Top Close Open

An alias to the filename() method.

value()

Top Close Open

An alias to the filename() method.

values()

Top Close Open

An alias to the filename() method.

template($context)

Top Close Open

The methods returns a template object corresponding to the filename stored in the element.

source()

Top Close Open

This method returns the source code for the element (i.e. the filename).

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

TODO

Top Close Open

Change this to URI, path, or something less filename-specific

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 also mixes in methods from the Template::TT3::Element::Role::Filename module.

It is constructed using the Template::TT3::Class::Element class metaprogramming module.


http://tt3.template-toolkit.org/docs/Template/TT3/Element/Filename.pm last modified 2009-12-21 18:39:41