Michael Maciag wrote:
I've begun to debug the first pages I written using tt.

I have this simple beginning of a page:

[% USE CGI %]
[% SET myhost = CGI.server_name %]
[% SET myfoo = CGI.param('foo') %]

When I set DEBUG_UNDEF, I get an error "param is undefined" but no error
from the call of server_name just before it.

I'm using a ResponseHandler in mod_perl2 if that has any bearing.

What might I be doing wrong?

I'd suggest to first test this with a simple ModPerl::Registry script, before blaming the CGI plugin.


Starting from CGI.pm v. 2.93 there is a new option to new():

CGI->new($r)

passes the $r object so CGI.pm can use it to retrieve data. If you use CGI.pm to parse arguments without setting PerlOptions +GlobalRequest, the data won't be available,
http://perl.apache.org/docs/2.0/user/config/config.html#C_SetHandler_
but on the other hand CGI.pm should croak if that's the case. I saw that Lincoln has released a few new versions of CGI.pm, so he may have changed the behavior again. Check the latest docs.


If you have the problem with the script, post the bug report to the modperl list following these guidelines:
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems


In any case whoever maintains the CGI plugin for TT, see if you can pass the $r argument to it when running under mod_perl2 and $CGI::VERSION > 2.92.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to