![]() |
![]() |
Supporting the evolution of a new free world. |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
DOCUMENTATIONNAME
Template::SGML - Template handler using the SGML processing instructions
DESCRIPTION
The Template::SGML is an easy way to generate templates for applications. To embed Perl code into the template use the SMGL construct <? ... ?>. Inside this construct typically Perl code can be execute. The <?= ... ?> construct is a synonym for <? print ... ?>. Text outside the SGML statements is interpreted as double quoted string. In this way variables can be evaluated without generating explicit output statements.
Examples
--- perl script ---
use Template::SGML; $tpl = Template::SGML->new(); # parse a template and compile it eval $tpl->get( 'template1' ); - or - # parse a template, compile it into a sub routine and run it # the template will be compiled only once until it has been changed $tpl->run_compiled( 'template1' ); --- template1 ---
<html> <body> <h1>called by $0</h1> <p>show the environment:</p> <? foreach( %ENV ) { ?> <? print "[$_] => $ENV{$_}" ?><br> <? } ?> </body> </html>
AUTHORS
Written by Christian Mueller
COPYRIGHT
Template::SGML is free software. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
SEE ALSO
Project Homepage: http://www.navalla.org/template-sgml/
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Generated with Perl 5.10.0 and
Perl-CGI 1.0 over
FastCGI within 18.12ms
in memory safe mode.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||