Maybe not exactly what you want, but it sounds to me like you have different versions of Perl, potentially different bit-tedness and want to be able to install / compile modules correctly for each one.
I do this in Windows with a batch script. See Re: Multiple Strawberry Perl Versions under Windows for details.
Essentially, I'm pointing the C:\Strawberry directory to the root installation directory of any version of Perl on my system. That way, no changes to PATH are needed and from the command prompt, 'perl' will always run and be whatever version, and with all the proper associations (gcc, as, ar, etc.) for that specific version.
My default:
VinsWorldcom@C:\Users\VinsWorldcom> perl -v
This is perl 5, version 18, subversion 1 (v5.18.1) built for MSWin32-x
+64-multi-thread
[....]
VinsWorldcom@C:\Users\VinsWorldcom> as --version
GNU assembler (GNU Binutils) 2.23.2
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
+ of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-w64-mingw32'.
Now let's switch to Perl 5.8 32-bit:
VinsWorldcom@C:\Users\VinsWorldcom> perlreloc.bat 5.8.8-MSWin32-x86-mu
+lti-thread
Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
Deleted c:\strawberry.
Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
Created: c:\strawberry
Targetted at: c:\strawberry_5.8.8-MSWin32-x86-multi-thread
5.008008 @ C:\strawberry\perl\bin\perl.exe
...and verify
VinsWorldcom@C:\Users\VinsWorldcom> perl -v
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
[...]
VinsWorldcom@C:\Users\VinsWorldcom> as --version
GNU assembler 2.17.50 20060824
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
+ of
the GNU General Public License. This program has absolutely no warran
+ty.
This assembler was configured for a target of `mingw32'.
|