Jim Albert wrote:
For example, one piece of my code has
use Apache::Const
but I had to change that to use Apache2::Const on the server running the
lastest mod_perl.
Can you give me the logic to handle that properly in a single code file.
Thanks again.
>>I think your key here is the MOD_PERL_API_VERSION environment >variable.
>>
>>BEGIN {
>> if ( $ENV{MOD_PERL_API_VERSION} == 2 ) {
>> # do mp2 stuff
>> }
>>}
Thats a start.
The first to come to mind is
Apache::DBI v 0.98 available here:
http://p6m7g8.net/Apache-DBI/Apache-DBI-0.98.tar.gz
AuthDBI.pm will give an a decent example.
After looking at it again,
BEGIN {
if (MP2) {
require Apache2::Const;
Apache2::Const->import(-compile => qw(OK DECLINED));
}
else {
require Apache::Constants;
Apache::Constants->import(qw(OK DECLINED));
}
}
Should probably be: [I'll have to test it a little later]
BEGIN {
if (MP2) {
require Apache2::Const;
Apache2::Const->import(qw(OK DECLINED));
}
else {
require Apache::Constants;
Apache::Constants->import(qw(OK DECLINED));
}
}
you might also want to checkout:
http://perl.apache.org/docs/2.0/rename.html
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com