[Omaha.pm] FW: Template Toolkit INCLUDE that won't die
Jay Hannah
jhannah at omnihotels.com
Tue Sep 26 11:55:06 PDT 2006
A neat Template Toolkit trick...
j
________________________________
From: Sean Baker
Sent: Tuesday, September 26, 2006 1:03 PM
I needed to [% INCLUDE %] a template that could or could not exist. It
was dying ungracefully in TT, and using [% PERL %] to check to see if
the directory and/or file exists was quite ugly.
Presto:
[% TRY %]
[% INCLUDE "$rateInclude" %]
[% CATCH %]
[% END %]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20060926/ad049bc5/attachment.html
More information about the Omaha-pm
mailing list