[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: [perl #6665] Different behavior using the -Idir option on the command line and
2008/9/29 reneeb via RT <perlbug-comment@perl.org>:
> The -I switch doesn't add the directory to @INC twice with both 5.8.8
> and 5.10.0.
I'd call that a feature.
> @P5P: Is there a reason why -I on the command line adds the directory at
> the beginning of @INC and -I in the shebang line at the end of @INC?
Order of processing: -I on the command-line prepends, because actually
it appends to an empty @INC. Once the perl script is opened, @INC is
initialized.
I suppose that, to be consistent with the docs, -I could be made to
always prepend.
Note, however, that lib.pm prepends, as does PERL5LIB; and why use -I
on the shebang line when you have a perfectly good lib.pm to do what
you want ? :)
- Follow-Ups from:
-
Steffen Mueller <wyp3rlx02@sneakemail.com>
Renée Bäcker <renee.baecker@smart-websolutions.de>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]