The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

OpenFrame::WebApp::Template::Factory - a factory for various types of template wrappers.

SYNOPSIS

  use OpenFrame::WebApp::Template::Factory;

  my $tf = new OpenFrame::WebApp::Template::Factory()
    ->type( 'tt2' )
    ->directory( $local_dir )            # optional
    ->processor( new Template( ... ) );  # optional

  my $tmpl = $tf->new_template( $file, @new_args );

DESCRIPTION

The OpenFrame::WebApp::Template::Factory class should be used to create template wrappers as needed. It lets you specify a template directory where all the template files must live.

This class inherits its interface from OpenFrame::WebApp::Factory. It uses OpenFrame::WebApp::Template-types()> to resolve class names.

ADDITIONAL METHODS

directory()

set/get template root directory. only 1 entry is supported currently.

processor()

set/get optional template processor (for greater control).

new_template( $file, ... )

creates a new template wrapper of the appropriate type for the $file given (if template_directory is set, it is treated as the root directory). passes all other arguments to the template's constructor.

TODO

Support for multiple template directories.

AUTHOR

Steve Purkis <spurkis@epn.nu>

Based on OpenFrame::AppKit::Segment::TT2, by James A. Duncan.

COPYRIGHT

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

SEE ALSO

OpenFrame::WebApp::Factory, OpenFrame::WebApp::Template