Template Toolkit Version 3 Developer Documentation
http://www.template-toolkit.org/v3/

Template::Base

Table of Contents

: $ERROR$ETYPE$SNIPPET
: new()init()mandatory()optional()error()throw()DEBUG()ID()INSPECT()_inspect_ref()_inspect_hash()_inspect_list()_inspect_text()
NOTES:

Synopsis


Description

The base class implements a constructor method new() which delegates to an initialiser method, init(). This is the method that most subclass will redefine. The mandatory() and optional() methods are available for checking constructor arguments from the init() method.

The error() can be used for general purpose error reporting and retrieval. The throw() method throws exceptions, default to the type defined by the $ETYPE variable in the subclass package.

Various other debug and general utility methods are defined. DEBUG() generates debugging messages, ID() returns a sensible identifier for an object and INSPECT() returns a string containing a summary of the current object status. The _inspect_hash(), _inspect_list() and _inspect_text() methods provide an easy way of inspecting the contents of a hash, list or text block, respectively.


Package Variables


Methods

Template Toolkit Version 3 Developer Documentation
http://www.template-toolkit.org/v3/