Thanks Andy. Here is the template code:
[% TRY %]
[% PERL %]
die "nothing to live for\n";
[% END %]
[% CATCH %]
error: [% error.info %]
[% END %]
It gives me the eval_perl not set error. I tried your code (from below) and it
also gave me the eval_perl not set error. I restarted apache several times, so
I'm pretty sure the new files are being read.
-----Original Message-----
From: Andy Wardley [mailto:[email protected]]
Sent: Tue 5/26/2009 4:52 PM
To: Stabinger, John
Cc: [email protected]
Subject: Re: [Templates] Still can't get eval_perl working...
On 26/5/09 19:20, Stabinger, John wrote:
> I'm sorry to be such a pain (and/or sound like a newb) but I just cannot
> get eval_perl set. Anyway, I've attached my config file to this email
> (in txt format) in case anyone can (or has time to!) take a look and
> advise. Keep in mind that this isn't my app. that is using tt. Thanks,
That all looks correct to me. Can you post an example of one of your
templates that's using a PERL...END block and not producing the correct
output?
If the EVAL_PERL option isn't being set then an exception should be
thrown. Here's an example of what to expect, using the the tpage utility
(a simple command line wrapper around Template):
[...@shiny ~] tpage
[% PERL %] print "hello world" [% END %]
^D
perl error - EVAL_PERL not set
With the EVAL_PERL option set:
[...@shiny ~] tpage --eval_perl
[% PERL %] print "hello world" [% END %]
^D
hello world
If you're NOT getting an exception throw when you process templates with
PERL blocks in them, then it would suggest that the EVAL_PERL setting is
being set correctly. If that is the case then perhaps it's something in
your PERL blocks that's not doing what you're expecting it to do?
HTH
A
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates