[Templates] ANNOUNCE: Template-Plugin-HTML-Template
Tatsuhiko Miyagawa
miyagawa@edge.co.jp
Thu, 26 Sep 2002 01:02:08 +0900
Just an announcement of scary plugin: Template::Plugin::HTML::Template!
Well, it uses following hacking code to get stash variable keys.
my $dont_use = qr/^(?:global|component|HTML|_DEBUG|_PARENT|dec|template)$/;
# XXX there should be a better way
my $stash = $self->{_CONTEXT}->stash;
my @keys = grep !/$dont_use/, keys %{$stash};
Is there any better way than this?
--
Tatsuhiko Miyagawa <miyagawa@edge.co.jp>
NAME
Template::Plugin::HTML::Template - HTML::Template filter in TT
SYNOPSIS
my $tt = Template->new;
$tt->process('html-template.tt', { myname => 'foo' });
# html-template.tt
[% USE HTML.Template %]
[% FILTER html_template %]
My name is <TMPL_VAR name=myname>
[% END %]
DESCRIPTION
Template::Plugin::HTML::Template is a TT plugin to filter HTML::Template
templates. It might sounds just silly, but it can be handy when you want
to reuse existent HTML::Template templates inside TT.
AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
SEE ALSO
the Template manpage, the HTML::Template manpage
The URL
http://bulknews.net/lib/archives/Template-Plugin-HTML-Template-0.01.tar.gz
has entered CPAN as
file: $CPAN/authors/id/M/MI/MIYAGAWA/Template-Plugin-HTML-Template-0.01.tar.gz
size: 1468 bytes
md5: 80dd8e59b7d63088e5d3ef589c97d181