newbie01 perl <newbie01.p...@gmail.com> writes: > Hi all, > > With multiple Perl install, there will be multiple versions of the same > modules. > > How can you change the order of where @INC look for the specific version of > the module that you want to use? Is this done by using use lib? > > use lib qw(/path/to/one/library /path/to/another ...... );
Another way might be to set: PERL5LIB in your environment. In much the same way you might set your shells path to executables. Aim at the directories where the versions you want live. Then I think perl would search in that order. (Assuming a bash shell) An example might be (Note the `paths' are separated by colon, but the `export' is separated by semi-colon): PERL5LIB:/usr/lib/perl5/5.10.1:/usr/lib/perl5/5.8.8 ; export PERL5LIB To make perl search the 5.10.1 install first. Probably be wise to include $PERL5LIB at the end in case there are already settings there... they won't be lost, just moved to the end. And so perl would search them last. PERL5LIB:/usr/lib/perl5/5.10.1:/usr/lib/perl5/5.8.8:$PERL5Lib ; export PER5LIB But for less than general use, the `use lib' is probably better. PERL5LIB would be used if you mostly always wanted to use a certain install. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/