gugod/App-perlbrew — Issue #152: perlbrew use perl-$version@$lib adds to list of current libs
Author: hoelzro
Created: 2011-10-18 15:58:36+00:00
State: open

When I use `perlbrew use perl-5.14.2@test`, it prepends that local::lib's lib directory to the current `@INC`, instead of replacing it. Is this a bug, or an intended feature?

Here's an example of what I mean:

$ perlbrew use perl-5.14.2
$ perl -Mfeature=say -e 'say foreach @INC'
/home/rob/.perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/x86_64-linux
/home/rob/.perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2
/home/rob/.perlbrew/perls/perl-5.14.2/lib/5.14.2/x86_64-linux
/home/rob/.perlbrew/perls/perl-5.14.2/lib/5.14.2
$ perlbrew use perl-5.14.2@default
$ perl -Mfeature=say -e 'say foreach @INC'
/home/rob/.perlbrew/libs/perl-5.14.2@default/lib/perl5/x86_64-linux
/home/rob/.perlbrew/libs/perl-5.14.2@default/lib/perl5/x86_64-linux
/home/rob/.perlbrew/libs/perl-5.14.2@default/lib/perl5
/home/rob/.perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/x86_64-linux
/home/rob/.perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2
/home/rob/.perlbrew/perls/perl-5.14.2/lib/5.14.2/x86_64-linux
/home/rob/.perlbrew/perls/perl-5.14.2/lib/5.14.2
$ perlbrew use perl-5.14.2@test
$ perl -Mfeature=say -e 'say foreach @INC'
/home/rob/.perlbrew/libs/perl-5.14.2@test/lib/perl5/x86_64-linux
/home/rob/.perlbrew/libs/perl-5.14.2@test/lib/perl5
/home/rob/.perlbrew/libs/perl-5.14.2@default/lib/perl5/x86_64-linux
/home/rob/.perlbrew/libs/perl-5.14.2@default/lib/perl5/x86_64-linux
/home/rob/.perlbrew/libs/perl-5.14.2@default/lib/perl5
/home/rob/.perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/x86_64-linux
/home/rob/.perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2
/home/rob/.perlbrew/perls/perl-5.14.2/lib/5.14.2/x86_64-linux
/home/rob/.perlbrew/perls/perl-5.14.2/lib/5.14.2