Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
Is there something that does the same thing as 'lib' but appends the directories to the end of @INC instead of the beginning. I can do BEGIN { push @INC, ... } but I lost the extra stuffs that 'lib' does (e.g. appending arch/version/auto dirs).
Currently my trick is to do:
use lib "/foo", "/bar"; @INC = (@lib::ORIG_INC, splice(@INC, 0, @INC-@lib::ORIG_INC));
But it's a bit cryptic.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Adding directories to the end of @INC
by mykl (Monk) on Jul 01, 2011 at 10:33 UTC | |
Re: Adding directories to the end of @INC
by Anonymous Monk on Jul 01, 2011 at 10:37 UTC | |
Re: Adding directories to the end of @INC
by Khen1950fx (Canon) on Jul 01, 2011 at 17:35 UTC | |
Re: Adding directories to the end of @INC
by sundialsvc4 (Abbot) on Jul 01, 2011 at 13:14 UTC |
Back to
Seekers of Perl Wisdom