perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [patch] PerlINC implementation
Date Tue, 20 Nov 2001 06:22:54 GMT
Doug MacEachern wrote:

> On Mon, 12 Nov 2001, Stas Bekman wrote:
>>this patch implements the PerlINC wrapper which does:
>>s/PerlSwitches -Ilib=foo/PerlINC foo/
> if we add a new directive like this i think it should be a wrapper around
> what 'Perl{Set,Pass}Env PERL5LIB' would do, that is:
> - unshift @INC
> - work per-directory
> otherwise, i don't see the value in adding a new directive for something
> that can already be done with PerlSwitches or a 'use lib ...' in a
> PerlRequire'd file.

Now that PerlSetEnv is in place, the only missing thing is
porting from 1.x the special handling of PERL5LIB env var in the 
beginning of request and server startup.

I think this also should be done disregarding the value of SetupEnv, 
since it's a special variable.

Another issue is what happens if someone specifies:

PerlSetEnv Perl5LIB /foo
PerlINC /foo

in the same configuration scope. The thing about the two is that you 
cannot repeat the directives ala 'use lib' or PerlSwitches.

So may be we shouldn't endorse using 'PerlSetEnv PERL5LIB', but only 
'PerlPassEnv PERL5LIB'. I prefer to have one convenient way to mangle 
@INC, which satisfies needs of all. So far 'PerlSwitches -Mlib=/foo' is 
  a such, but the syntax is not nice.

I think the best clearest way to set @INC would be to use exactly the 
same logic as Perl(Set|Add)Var use, but handle @INC.


and have a special table entry in dir and srv configs for @INC.

what do you think?

Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker      mod_perl Guide

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message