NAME
Labyrinth::Writer - Output Management for Labyrinth
SYNOPSIS
use Labyrinth::Writer;
Publish('mytemplate.html');
PublishCode('MESSAGE');
DESCRIPTION
The Publish package contains one function, Publish(), which handles the parsing of a given template with global variables and prints the result.
EXPORT
Publish
PublishCode
UnPublish
Transform
Croak
FUNCTIONS
- Config()
-
Configure template parser and output method.
- Publish()
-
Publish() parses a given template, via Template Toolkit, and prints the result.
- PublishCode
-
Publishes a template based on an internal code. Current codes and associated templates are:
BADLAYOUT => 'public/badlayout.html', BADPAGE => 'public/badpage.html', BADCMD => 'public/badcommand.html', MESSAGE => 'public/error_message.html',
TODO: Provide these and more as configurable codes.
- UnPublish
-
Used to reset publishing status. Usually only applicable in mod_perl environments.
- Transform
-
Given a template and a set of variables, parse without publishing the content.
- Croak
-
A shorthand call to publish and record errors.
SEE ALSO
Labyrinth
AUTHOR
Barbie, <barbie@missbarbell.co.uk> for Miss Barbell Productions, http://www.missbarbell.co.uk/
COPYRIGHT & LICENSE
Copyright (C) 2002-2015 Barbie for Miss Barbell Productions
All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the Artistic License 2.0.