Stan and all,
I'll just send in things as I discover them. Nothing urgent; just file it and look at it when time permits. Hope that's ok.
Under ModPerl::Registry (in script handled by Registry), $r->args is not properly updated when the QUERY_STRING changes. Have to reload a couple of times. Looks like a cache thing(?).
Changing http://example.com/?name=Janet to .../?name=Brian, $r->args still contains "name=Janet".
On the other hand, is the availability of $r in registry scripts just a side-effect? (should $r be available or not).
Hmm, interesting. You must have created a closure. I'm sure if you show a sample code this will be easier to understand.
Based on your side-effect comment, I think what you do is:
test.pl:
--------
$r->content_type('text/plain');
$r->print($r->args);whereas you should do:
test.pl:
--------
my $r = shift;
$r->content_type('text/plain');
$r->print($r->args);why? because what registry does is wrapping the code into a function handler, passing $r as an argument. However it's also in the scope of the code that calls this function, so it looks like it work. However if you change your code to:
test.pl:
--------
use warnings;
$r->content_type('text/plain');
$r->print($r->args);you will see a warning:
Variable "$r" will not stay shared at /home/stas/apache.org/temp/ModPerl-Registry/t/cgi-bin/args.pl line 5.
I think there is a similar potential problem in mp1, but I haven't checked.
In any case I'll make sure that $r is not in scope. when handler is called.
Also make sure you have warnings enabled globally, this will prevent a lot of problems early.
PerlSwitches -wT
in httpd.conf.
__________________________________________________________________ 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
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
