OpenFrame::WebApp::Template::Factory - a factory for various types of template wrappers.
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 );
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.
OpenFrame::WebApp::Template::Factory
This class inherits its interface from OpenFrame::WebApp::Factory. It uses OpenFrame::WebApp::Template-types()> to resolve class names.
OpenFrame::WebApp::Factory
OpenFrame::WebApp::Template-
set/get template root directory. only 1 entry is supported currently.
set/get optional template processor (for greater control).
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.
template_directory
Support for multiple template directories.
Steve Purkis <spurkis@epn.nu>
Based on OpenFrame::AppKit::Segment::TT2, by James A. Duncan.
OpenFrame::AppKit::Segment::TT2
Copyright (c) 2003 Steve Purkis. All rights reserved. Released under the same license as Perl itself.
OpenFrame::WebApp::Factory, OpenFrame::WebApp::Template
To install OpenFrame::WebApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenFrame::WebApp
CPAN shell
perl -MCPAN -e shell install OpenFrame::WebApp
For more information on module installation, please visit the detailed CPAN module installation guide.