NAME

OpenFrame::WebApp::Segment::Template::Loader - a pipeline segment to load templates.

SYNOPSIS

use Pipeline;
use OpenFrame::WebApp;

my $pipe = new Pipeline;
# ... add segments that put a Template in the store ...
$pipe->add_segment(new OpenFrame::WebApp::Segment::Template::Loader);

$pipe->dispatch;  # will load any OpenFrame::WebApp::Template in the store.

DESCRIPTION

The OpenFrame::WebApp::Segment::Template::Loader class is an OpenFrame::WebApp::Segment::Template segment and inherits its interface from there. On dispatch(), it looks for a OpenFrame::WebApp::Template object (see below), calls its process() method, and returns the result.

METHODS

$ofResponse = $obj->dispatch

process first template found in the store & returns the result (if any).

$ofResponse = $obj->process_template( $template )

process template & return an OpenFrame::Response.

$ofResponse = $obj->template_not_found( $file )

generate response when template not found.

$ofResponse = $obj->template_error( $message )

generate response on template error.

TODO

Only include detailed error messages if in debug mode (ie: on a development, not production server).

AUTHOR

Steve Purkis <spurkis@epn.nu>

COPYRIGHT

Copyright (c) 2003 Steve Purkis. All rights reserved. Released under the same license as Perl itself.

SEE ALSO

OpenFrame::WebApp::Template, OpenFrame::Response