Hello,

I played around with TT2 and the CGI Plugin a little bit and found a  
strange behavior:

- I just created a brand new Catalyst application with standard  
components

_ I created a TT template, which looks like this:

[% PROCESS header %]

[% USE CGI %]

[% myTest = CGI.params.test %]

You sent the string '[% myTest %]'

[% PROCESS footer %]

and modified the Root.pm controller to look like this:

sub default : Path : Args {
     my ( $self, $c, @path ) = @_;

     my $path = join('/', @path);

     if (-e "root/" . $path . '.tt') {

         $c->stash->{template} = $path . '.tt';
     }
}

(I need this kind of URL2template matching for different reasons) and  
then started the build in web-server (./script/my_app_server.pl -d -p  
8080).

When I call the template for the first time with some 'test' GET  
parameter, it will be shown correctly in the output. When I then  
modify this GET parameter to another value and do the request, it does  
not change and still is showing me the first value I set. Even when I  
load the URL in a different browser, I still see the first defined  
value for 'test' - so it's not a browser caching issue. When I run the  
test-script "./script/my_app_test.pl" it works fine - the GET  
parameter changes, because it's not using the Catalyst server which  
runs all the time.

Does anyone have an idea what could be wrong? Maybe the CGI module  
does not get reseted between requests?

Many thanks in advance :) Marc

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to