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:
Method that will call the execute procedure of the specified tag. Should be overridden by the inheriting class.
Parameters:
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 execution_stage
s allow to specifiy an execution order that's different from the appearance order.
<& perl execution_stage="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.