We have the way to do it:
Apache->server->add_config(['PerlOptions +GlobalRequest +SetupEnv']);
But normally, those options are set in httpd.conf's specific containers and not always globally for the whole server. I'm not sure it's a good idea to enforce these settings for the whole server. What do you think?
I'm not sure. I'm trying to decide what is expected when someone uses Apache::compat. I think it ought to be API compatibility, not config compatibility. so, +SetupEnv doesn't qualify, since it's on by default for perl-script under mp1 and mp2. +GlobalRequest is a likely candidate, though, since Apache->request ought to work under the compat layer. but maybe we could inject +GlobalRequest on demand rather than on module load - kind of like the override foo for methods that collide with core mp2 ones.
You have the API to do that override already. Add as the first line in your script:
$r = shift; Apache->request($r);
and if we provide this override API, it might be too late if you use:
Apache->server->add_config(['PerlOptions +GlobalRequest']);
or too early if you use:
$r = shift; Apache->request($r);
depending on where the user have called that overriding API from.
Besides, as you have pointed out Apache::compat does *not* provide you a complete back compatibility by just loading it. Several back-compat functions need to be enabled explicitly. For example:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C__r_E_gt_finfo_
http://perl.apache.org/docs/2.0/user/porting/compat.html#C__r_E_gt_notes_
and a few more. So there is always a chance that you need to do more than just loading Apache::compat.
__________________________________________________________________ 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
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html