On Fri, 2003-01-31 at 12:34, Stas Bekman wrote:
> 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.

+1 I think its a good way to do this

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


--------------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5
(122FF51B/C634E37B)
http://gozer.ectoplasm.org/    F9BF E0C2 480E 7680 1AE5 3631 CB32 A107
88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so
ingenious.
perl
-e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to