Hello TomDLux,

You don't say what operating systems you are using, but if it's a *nix version, you should be able to use 'ln -s'.

I support a number of *nix ( AIX, Debian, Suse, etc ) boxes and I leave the default Perl to the operating system. But I install different versions of Perl in the '/usr/local/bin/' directory. I use a separate filesystem (or directory) for all Perl version source code and 'configure' and 'make' etc so that I have completely different directories for each Perl version.

I then go to the '/usr/local/bin/' directory and move the newly installed 'perl' to 'perl5.14.2' or whatever the actual version is. Now if it's a new and untested Perl, I use link 'ln -s -f perl5.14.2 perltest'. You need the force if it is already defined. When the testing is complete and your happy with the Perl version, you use link 'ln -s -f perl5.14.2 perlgood' and now your "official" version on that box is 'perlgood'. ( Note: I don't use 'perlgood', but link the base 'perl' to the tested 'good' version) (Also, any CPAN dependencies have to be installed in the new Perl.)

You can verify which release by:

perltest -v
And you can see all versions you have by:
ls -l /usr/local/bin/perl*
and you get something like this:(just the end column)
... /usr/local/bin/perl -> perl5.12.2 ... /usr/local/bin/perl5.10.1.threads ... /usr/local/bin/perl5.10.1 ... /usr/local/bin/perl5.12.2 ... /usr/local/bin/perl5.16.0 ... ... /usr/local/bin/perltest -> perl5.16.0
Okay, so how does this help you?

Now you have a way to check-point scripts that have a dependency that a newer version of Perl doesn't work/support/etc. For instance you notice that I have a threaded and non-threaded versions of perl5.10.1. If you have a script dependency on threads, you can hard-code the shebang to:

#!/usr/local/bin/perl5.10.1.threads -w
Unless I have a need for 'threads' in *nix, I run all scripts with a non-threaded Perl for perfomance. YMMV!

AIX and CPAN are almost mutually exclusive. So I usually have to download and manually install. So scripts on AIX tend to not get updated as much as the Linux systems. I hope you get the idea, and if you improve the process I'd be interested in any and all improvements. ( And don't forget to document the process for your fellow workers. )

Good Luck...Ed

"Well done is better than well said." - Benjamin Franklin


In reply to Re: Managing modules of various versions by flexvault
in thread Managing modules of various versions by TomDLux

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.