On Tue, Nov 20, 2001 at 02:22:54PM +0800, Stas Bekman wrote:
> 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?
Sounds good to me, but I have a question. If one does :
<Location /foo>
PerlSetINC /this/dir
</Location>
</Location /bar>
PerlSetINC /this/other/dir
</Location>
Can I assume that it would:
1. Populate @INC on a per-request/per-location basis ?
2. Allow for changes of @INC , like if the application code fiddles
with it, be guaranteed that whatever is specified by PerlSetINC
will be in @INC for every request?
In any case, I like the syntax ;-)
+0 on concept.
> _____________________________________________________________________
> Stas Bekman JAm_pH -- Just Another mod_perl
> Hacker
> http://stason.org/ mod_perl Guide
> http://perl.apache.org/guide
> mailto:[EMAIL PROTECTED] http://ticketmaster.com
> http://apacheweek.com
> http://singlesheaven.com http://perl.apache.org
> http://perlmonth.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
+----------------------------------------------------+
| Philippe M. Chiasson <[EMAIL PROTECTED]> |
+----------------------------------------------------+
| F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5 |
+----------------------------------------------------+
gethostent not implemented : Your C library apparently
doesn't implement gethostent(), probably because if it did,
it'd feel morally obligated to return every hostname on the
Internet.
-- perldiag(1)
perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl
Hacker!\n$/&&print||$$++&&redo}'
msg01856/pgp00000.pgp
Description: PGP signature
