On Sat, 8 Mar 2003, Stas Bekman wrote:
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:
The $r=shift did the trick. I wasn't aware that the code was wrapped into a handler until I studied the RegistryCooker source yesterday. Sorry.
No prob. It won't work with the latest cvs without:
my $r = shift;
or
$r = Apache->request; # with PerlOptions +GlobalRequest
.
It's good that you caught it ;)
__________________________________________________________________ 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]
