[Templates] Announce: CGI::Builder::TT2 0.01
[prev]
[thread]
[next]
[Date index for 2004/06/21]
I just uploaded CGI::Builder::TT2 to CPAN.
A big 'THANK YOU' to Domizio Demichelis, and to Vince Veselosky.
cheers,
S.
+++
NAME
CGI::Builder::TT2 - CGI::Builder and Template Toolkit 2 integration
DESCRIPTION
This module transparently integrates "CGI::Builder" and "Template"
in a very handy, powerful and flexible framework that can save you a
lot of coding, time and resources. [...]
Example
There's an extended example in the directory "example/" of the
module distribution. Anyway, here a snippet to get the general idea:
package WebApp;
use CGI::Builder qw/ CGI::Builder::TT2 /;
sub PH_index
{
my $self = shift;
$self->tt_vars( environment => \%ENV );
}
Here's the template:
<html>
<head>
<meta http-equiv=content-type
content="text/html;charset=iso-8859-1">
<title>A random example :)</title>
</head>
<body>
<table>
[% FOREACH k IN environment.keys %]
<tr>
<td>[% k %]</td>
<td>[% environment.$k %]</td>
</tr>
[% END %]
</table>
</body>
</html>
--
Stefano Rodighiero | http://larsen.perlmonk.org
mailto:larsen@xxxx.xx | http://www.perl.it
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] Announce: CGI::Builder::TT2 0.01
Stefano Rodighiero 20:44 on 21 Jun 2004
|