README for the Perl Module CGI::FastTemplate - 1.09
Copyright (c) 1998-1999 Jason Moore <jmoore@sober.com>. All rights
reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Artistic License for more details.
CGI::FastTemplate manages templates and parses templates replacing variable names with values. It was designed for mid to large scale web applications (CGI, mod_perl) where there are great benefits to separating the logic of an application from the specific implementation details.
For example using FastTemplate it is possible to:
CGI::FastTemplate has the following attributes:
Speed
FastTemplate doesn't use eval, and parses with a single
regular expression. It just does simple variable
interpolation (i.e. there is no logic that you can add to
templates - you keep the logic in the code). That's why
it's has 'Fast' in it's name!
Efficiency
FastTemplate functions accept and return references
whenever possible, which saves needless copying of
arguments (hashes, scalars, etc).
Flexibility
The API is robust and flexible, and allows you to build
very complex HTML documents or HTML interfaces. It is
100% perl and works on Unix or NT. Also, it isn't
restricted to building HTML documents -- it could be used
to build any ascii based document (e.g. postscript, XML,
email).
For more information see the pod documentation included in the file 'FastTemplate.pm'.
To install, unzip and untar the archive. In the directory created type:
perl Makefile.PL
make
make install
Note: If this does not work, you can always just copy the file 'FastTemplate.pm' to the 'CGI' directory in your perl distribution.
If you want to test out the module without installing it, you can add the following to your code:
BEGIN
{
unshift(@INC, "/wherever/you/put/CGI-FastTemplate/");
}
use CGI::FastTemplate;
Documentation is included in the module in pod format. Once CGI::FastTemplate has been installed type:
perldoc CGI::FastTemplate
or if is uninstalled:
perldoc ./FastTemplate.pm
For more information on perldoc type 'perldoc perldoc'.
Jason Moore <jmoore@sober.com>
Feel free to send along any comments, suggestions, or bug reports.
Revision history for Perl extension CGI::FastTemplate.
1.09 Sun Jun 27 23:40:14 EDT 1999
1.08 Sun Jan 24 23:14:03 EST 1999
1.07 Sun Jan 24 23:14:03 EST 1999
1.06 Mon Jan 4 13:47:13 EST 1999
clear_tpl() - clears all loaded templates from cache
clear_tpl(SCALAR) - clears only template SCALAR
clear_tpl(ARRAY) - clears templates named in ARRAY
1.05 Fri Nov 27 15:27:54 EST 1998
1.04 Thu Oct 29 09:57:15 EST 1998
1.03 Thu Oct 15 10:42:14 EDT 1998
1.02 Tue Sep 22 08:57:29 EDT 1998
1.01 Tue Sep 15 10:01:44 EDT 1998
$tpl->clear("FOO"); ## equivalent to: $tpl->assign(FOO=>"");
1.00 Thu Aug 20 11:59:22 1998