On Sun, 2004-09-19 at 17:10, Tosh Cooey wrote:
> This all works fine under a normal Apache CGI environment, but once the script
> is running under ModPerl::Registry, or even ModPerl::PerlRun I am not getting
> the correct files served.
>
> For example, www.site.com/view.pl?product=xyz might actually show me the result
> of www.site.com/view.pl?category=foo.
Tosh,
Your code probably has a closure in it somewhere. For example, this
will break in any persistent environment (FastCGI, PerlEx, mod_perl,
etc.):
my $cgi = CGI->new();
do_something();
sub do_something {
my $product = $cgi->param('product');
print $product;
}
The "do_something" sub creates a closure with $cgi, and the value of
$cgi will never change after the first invocation. The way to fix it is
to pass all your variables to your subs instead.
- Perrin
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates