tonkin has asked for the wisdom of the Perl Monks concerning the following question:

Oops. In my zeal to never again have to write 'use lib' I added my home perl lib dir to @INC _twice_ when building perl 5.8 today. Once at the front, once at the back. Any ideas how to get it off the second time -- or is it not a problem because perl is smart enough not to search twice? Thanks, Nick
  • Comment on How to remove lib dir added twice at perl build time?

Replies are listed 'Best First'.
Re: How to remove lib dir added twice at perl build time?
by castaway (Parson) on Jan 18, 2003 at 11:40 UTC
    Just as a hint, you can add extra lib directories by setting the environment variable 'PERL5LIB' instead of rebuilding perl each time you want to extend @INC.

    C.

Re: How to remove lib dir added twice at perl build time?
by chromatic (Archbishop) on Jan 18, 2003 at 05:32 UTC

    You'll have to rebuild Perl to fix this. It won't normally be a problem, though.

Re: How to remove lib dir added twice at perl build time?
by CountZero (Bishop) on Jan 18, 2003 at 09:42 UTC

    I'm sure it won't be a problem: if PERL needs something it will search the @INC-paths. If it finds it in your home perl lib dir, it will stop searching further. If it doesn't find it, it will search it again in your home perl lib dir(and of course again doesn't find it) and will then fail with an appropriate error. So either it finds it fast or it fails it a little bit slower.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law