ColinB wrote:
I'm trying to get some perl scripts that work OK under mod_perl 1 working in mod_perl 2. I'm therefore using the mod_perl 1 backward compatiblity, and also the Apache::Registry from mod_perl 1 (as described in the mod_perl 2 documentation to get around the chdir() problem).
One of the scripts sets up a request handler, but when it tries to execute:
$r->cgi_env(AB_AUTHHOST=>$host);
I have never used that API, but I believe you misuse it. I think it should be:
$r->subprocess_env(AB_AUTHHOST=>$host);
which works in mp1 and mp2.
cgi_env() is an alias to subprocess_env() in mp1, but it returns the env vars in the list context.
I'll update the docs and Apache::compat shortly.
I'm going to commit this (in case you don't want/can't s/cgi_env/subprocess_env/)
Index: lib/Apache/compat.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.85 diff -u -r1.85 compat.pm --- lib/Apache/compat.pm 11 Apr 2003 07:34:03 -0000 1.85 +++ lib/Apache/compat.pm 28 Jul 2003 10:22:10 -0000 @@ -401,6 +401,9 @@
sub is_main { !shift->main }
+# really old back-compat methods, they shouldn't be used in mp1 +*cgi_var = *cgi_env = \&Apache::RequestRec::subprocess_env; + package Apache::File;
use Fcntl ();
__________________________________________________________________ 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