Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: multi version perl

by farang (Hermit)
on Jun 06, 2013 at 22:20 UTC ( #1037519=note: print w/ replies, xml ) Need Help??


in reply to multi version perl

For a single user under Ubuntu 12.04, or a perl install just for a single user, you can take advantage of that system automagically placing the directory ~/bin/ if it exists at the front of the path. If you do this, no linking or manual fiddling with the path is necessary, and everything can be kept under the home directory.

#!/bin/bash # doing this manually probably makes more sense :) if (! [ -d ~/bin/ ]; then mkdir ~/bin/; fi # create ~/bin/ if it does +n't already exist mv ~/localperl/* ~/bin/ # move the new perl install th +ere
See from which path the perl executable will run from the command line:
which perl
I like using a shebang line #!/usr/bin/env perl to run scripts under the same version shown by which perl unless hard-coding to a particular version is desired.

You'll still want to investigate setting PERL5LIB for module installations. Here is a decent simple explanation.

Perlbrew as mentioned is a good alternative to all this.


Comment on Re: multi version perl
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037519]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-08-21 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (134 votes), past polls