http://qs321.pair.com?node_id=912315

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.