perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
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
and
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.

PerlSetINC
PerlAddINC

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
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message