in reply to Need way to override PERL5LIB from inside pl script file

Hmm, lets go hunting [perldoc://PERL5LIB] PERL5LIB -> PERL5LIB

Oh wow, the docs for PERL5LIB don't explain they modify @INC

but they do mention use lib which does mention @INC, so not a complete lack of information

That doc could use an update :)

Replies are listed 'Best First'.
Re^2: Need way to override PERL5LIB from inside pl script file
by 1nickt (Canon) on Jun 25, 2015 at 14:08 UTC

    Well, that doc does say:

    A list of directories in which to look for Perl library files before looking in the standard library and the current directory.

    I guess it maybe wrongly assumes that the reader can translate "the standard library and the current directory" to mean @INC, but it does say explicitly what happens to @INC when you set PERL5LIB ...

    Probably could be clarified by adding a sentence stating that @INC will be modified by setting this environment variable.

    You can make the change to the docs yourself and get it into the next release of Perl, by forking, editing and making a pull request on GitHub ...

      but it does say explicitly what happens to @INC when you set PERL5LIB ...

      under PERL5LIB @INC isn't mentioned at all, so I don't know what you're talking about

      You can make the change to the docs yourself and get it into the next release of Perl, by forking, editing and making a pull request on GitHub ...

      You too, duh :)