Hi there, I've got an modperl 1 script I've trying to run under modperl2. It's a bit hairy, because it's actually a library (.pm file) which can be run either within a perl module, or in a stand alone CGI script. It also has to continue running on my old mod_perl 1 apache server for the time being.
Now it looks as if I can just add:
eval { use Apache2::compat };
at the top of the script and my needs will be satisfied.
However there appears to be a problem, which i can summaries as follows.
This piece of test code:
t.pl:
#!/usr/bin/perl
use Apache2::compat;
exit;
doesn't work. It blows up with:
% perl t.pl
Bareword "Apache2::ServerUtil::server_root" not allowed while "strict subs"
in use at /usr/local/lib/perl5/site_perl/5.8.8/mach/Apache2/compat.pm line 347.
BEGIN not safe after errors--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.8/mach/Apache2/compat.pm line 430.
Compilation failed in require at t.pl line 3.
BEGIN failed--compilation aborted at t.pl line 3.
This is with mod-perl2 version 2.0.3.
Is something wierd going on, or is the compat code broken in this
release?
Thanks,
Joe
pgpiqtTiUFhrl.pgp
Description: PGP signature
