> Running 2.05a (and restarting apache just for kicks, mod_perl isn't
> configured to affect these scripts) had no effect. I wrote a simple
> script to test, and it worked. I played around a bit and narrowed it down
> to the PRE_PROCESS and POST_PROCESS commands.
>
> [snip]
>
> [Wed Sep 19 10:59:55 2001] crash.cgi: Can't call method "process" on
> unblessed reference at
> /usr/lib/perl5/site_perl/5.005/i386-linux/Template/Context.pm line 286.
>
> If I remove any PRE_PROCESS and POST_PROCESS commands, it runs fine. The
> files pointed at don't appear to matter (my 'CrashHeader.html' file simply
> says "test"). Likewise, changing CACHE_SIZE to anything other than 0 also
> has it work fine.
>
> Advice? Thanks in advance!
It's a bug. It looks like Template::Provider::_fetch_path doesn't
handle CACHE_SIZE 0 correctly. Here's a patch, but I'm in a bit of
a hurry so I haven't had time to check it out fully. This does pass
the test suite and also makes your example work...
Craig
--- Template-Toolkit-2.05/lib/Template/Provider.pm.orig Tue Sep 11 08:10:41 2001
+++ Template-Toolkit-2.05/lib/Template/Provider.pm Thu Sep 20 23:57:56 2001
@@ -459,6 +459,7 @@
unless $error;
$data = $self->_store($path, $data)
unless $error || ! $caching;
+ $data = $data->{ data } if ( ! $caching );
# all done if $error is OK or ERROR
last INCLUDE if ! $error
|| $error == Template::Constants::STATUS_ERROR;