Jurriaan van der Laan wrote:
> $GlobalData{querydata}{date} = `date`;

That's a big price to pay just to get the date.  You should look into 
using a perl module for it instead (or localtime).

> my $tt = Template->new(
>             {
>                 INCLUDE_PATH => 'templates',
>                 TRIM  => 1,
>                 CACHE_SIZE => 0,
>                 OUTPUT => $r
>             }) || $log->error("$Template::ERROR\n");

You also shouldn't be creating a new template object each time.  You 
should do it once and then reue it.  And the CACHE_SIZE parameter is not 
related to the problem you're having so don't set that to 0.

> What I notice that unless I touch my perl script every the time (mod_perl
> will "recompile" it) the date om my web-page doen't change.

That means the problem is in your perl code, so you can take TT out of 
the picture.  Try just printing that value each time.

What you probably have is an unintentional closure.  You can either stop 
using Apache::Registry and write normal modules, or change the way your 
subroutines are coded.  I'm guessing %GlobalData is a lexical variable 
which you delcared outside of the sub that it's being used in.

For more help with this, I'd suggest you post a small snippet of code 
that illustrated the problem on the mod_perl mailing list.

- Perrin



Reply via email to