NAME

Konstrukt::TagHandler - Base class for the tag handlers.

SYNOPSIS

        use Konstrukt::TagHandler;
        use vars qw(@ISA);
        @ISA = qw(Konstrukt::TagHandler);

DESCRIPTION

Baseclass for <#!$ ... $!#>-tag handlers, where "#!$" is the identifier of the tag type.

METHODS

new

Constructor of this class

init

Method that will be called right after construction of this object. Should be overridden by the inheriting class.

prepare

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.

execute

Method that will call the execute 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.

prepare_again

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.

execute_again

Should return true, when this tag may generate (dynamic) tag nodes that shall be executed (e.g. return an template or perl node).

executionstage

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.

        <& 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

AUTHOR

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.

SEE ALSO

Konstrukt