Geoffrey Young wrote:


in src/modules/perl/mod_perl.c:

    /* SetEnv PERL5LIB */
    if (!MP_INCPUSH(cld)) {
        char *path = (char *)table_get(r->subprocess_env, "PERL5LIB");

        if (path) {
           perl_inc_unshift(path);
            MP_INCPUSH_on(cld);
        }
    }


right. and that was my point all along - (Perl)SetEnv doesn't work in 2.0. it did work in 1.0, but the syntax is funky since you can PerlSetEnv anywhere, even within a container, so sometimes it works and sometimes it doesn't, depending on when the one-per-request processing happens.

it doesn't work because mp2 doesn't do what mp1 did (snippet above) and because in mp2 Perl* directives aren't run immediately as they are encountered. It's easy to make a change to make PerlSetEnv PERL5LIB special and push it into environ before perl starts.


notice that it doesn't even split path on ':'.


yup :)

so I'm back to my original suggestion: let's mark (Perl)SetEnv PERL5LIB as deprecated, leave $ENV{PERL5LIB} behaving as perl does automatically (including ignoring under -T), and suggest PerlSwitches -I as the canonical way to add additional paths to @INC from httpd.conf.

I'm not convinced that users will be happy about it. If they run their own local install of perl libs, they would expect any perl app to respect that setting. The only requirement we can really add is to ask those users to 'PerlPassEnv PERL5LIB', or even add it to the list of TZ and HOME, that we pass by default. (that and PERLLIB). We probably could ask users about it. Or we could do nothing about it, until someone complains (while storing the summary of this discussion somewhere in the STATUS/todo?).


__________________________________________________________________
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


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to