httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hay <>
Subject Re: Rusty perl question
Date Mon, 13 Nov 2006 08:56:40 GMT
Patrick Galbraith wrote:
> Hi all,
> I used to know the trick, I think, but can't remember. I want to code my 
> application to be smart about whether it's on a system that can use 
> mod_perl2/apreq, or if I have to use CGI. I 've code my app to use CGI 
> successfully, but would like to keep the code that I worked to get apreq 
> working as well. I would like for my application to be smart enough to 
> say use apreq if it's there, or use CGI if it isn't. What's the magical 
> trick to toggle the 'use libfoo' or 'use libfee'? Kindof like #ifdefs in 
> C...

Can't you just "eval { use Apache2::Request }" and use that if it 
loaded, else fall back on CGI?


Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential
and intended for the addressee(s) only. If you have received this message in error or there
are any problems, please notify the sender immediately. The unauthorized use, disclosure,
copying or alteration of this message is strictly forbidden. Note that any views or opinions
presented in this email are solely those of the author and do not necessarily represent those
of Radan Computational Ltd. The recipient(s) of this message should check it and any attached
files for viruses: Radan Computational will accept no liability for any damage caused by any
virus transmitted by this email.
View raw message