Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-19 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found