In mod_perl 1.0 Apache->request was always there. In 2.0 it's there only if it's configured to be there('PerlOptions +GlobalRequest' or 'SetHandler perl-script'). I believe that if I write a module that relies on Apache->request, I shouldn't test whether Apache->request has returned something or not, but let mod_perl handle that and croak if it's not available, because it's a user's configuration error. And I'd rather have mod_perl nicely hint what should be changed in order to get Apache->request work, than write my own verification and explanations.

Remember that the code developed under mod_perl 1.0 relies on always having Apache->request, so people will have weird problems if we don't assert.

Currently I've changed the code to assert, and let the user handle this. Developers can always trap the croak in eval {Apache->request} if they use this only as an optional functionality.

__________________________________________________________________
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]

Reply via email to