Bricklayer::Templater::Handler - Base class for all Template tag handlers
Bricklayer::Templater::Handler does all the common heavy lifting that a Template tag handler needs to do. It initialize the handler object and sets up the callback hooks that are needed.
$self->app() returns the template engine
$self->attributes() returns a hashref of tag attributes. tag attributes are specified the same way that xml attributes are with the following restrictions.
$self->block() returns the text block contents of the tag. The bricklayer parser is not recursive on its own. If you tag is expected to process the block as more template text then you should call parse_block() as shown below.
$self->type() returns the tag type. This shoule be either 'block' or 'single' or 'text'. You probably will never need to use this.
$self->tagname() returns the tag's name. This should be the classname minus the Bricklayer::Templater::Handler:: part.
$self->tagid() returns the template engines current template tag identifier. It is equivalent to calling $self->app()->identifier.
Bricklayer::Templater::Handler::tag::name->load() is the constructor for a tag handler. it will get passed a Token data structure and the Template engine object as a context.
$self->parse_block($arg) is a convenience function that will run the templater on the block with any argument you pass in to it.
$handler->run_handler() is what the engine calls to actually run the handler. You probably shouldn't be using this method since it's mostly for internal use.
1 POD Error
The following errors were encountered while parsing the POD:
Expected text after =item, not a bullet
To install Bricklayer::Templater, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bricklayer::Templater
CPAN shell
perl -MCPAN -e shell install Bricklayer::Templater
For more information on module installation, please visit the detailed CPAN module installation guide.