Eric Sammer wrote: [...]
For Apache2, Apache::Request->new will always reference the appropriate per-request data; instance() isn't needed there,
so it won't be included in the 2.X releases.
That's pretty much what I was looking for. I just wanted to know that there will be a common and reliable way to get a copy of the current request object between request phases or parts of the system without trying to pass around the same $r all over the place (messy as hell).
It seems that you are still confused between $r and Apache::Request objects, which are two different things. The former is a request object which you can do many things with. The latter is just a GET/POST data container which gives you methods to access that data.
If you don't want to pass $r around, you can easily use the Class::Singleton class to get $r from anywhere under both mod_perl generations. There is even Apache::Singleton. See:
http://search.cpan.org/search?query=singleton&mode=all
Unrelated to your question, I'd like to remind those who use CGI.pm that its recent versions accept $r as an argument to new(). Something to think of if you plan to move to mp2 at some point.
__________________________________________________________________ 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
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html