Konstrukt::TagHandler - Base class for the tag handlers.
use Konstrukt::TagHandler; use vars qw(@ISA); @ISA = qw(Konstrukt::TagHandler);
Baseclass for <#!$ ... $!#>-tag handlers, where "#!$" is the identifier of the tag type.
Constructor of this class
Method that will be called right after construction of this object. Should be overridden by the inheriting class.
Method that will call the prepare procedure of the specified tag. Should be overridden by the inheriting class.
Parameters:
$tag - Reference to the tag (and its children) that shall be handled.
Method that will call the execute procedure of the specified tag. Should be overridden by the inheriting class.
Should return true, when this tag may generate plaintext that will parse to dynamic content (e.g. return plaintext nodes that contain Konstrukt tags (<& .. &>)).
Should be overwritten by the inheriting class.
Should return true, when this tag may generate (dynamic) tag nodes that shall be executed (e.g. return an template or perl node).
Returns the execution stage of the tag. Defaults to 1.
Usually all tags are "execute"d in the order of appearence in the processed document.
But sometimes you might want a tag to be executed last/later, although it's located at the top of the document. The executionstages allow to specifiy an execution order that's different from the appearance order.
executionstage
<& perl executionstage="2" &>print `date +%H:%M:%S`<& / &> <& perl &>print `date +%H:%M:%S`; sleep 2<& / &>
Will actually be rendered to something like:
10:50:54 10:50:52
Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.
This document is free software. It is distributed under the same terms as Perl itself.
Konstrukt
To install Konstrukt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Konstrukt
CPAN shell
perl -MCPAN -e shell install Konstrukt
For more information on module installation, please visit the detailed CPAN module installation guide.