Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to make symlink to new upgraded Perl?

by trippledubs (Deacon)
on Jun 15, 2015 at 12:52 UTC ( [id://1130468]=note: print w/replies, xml ) Need Help??


in reply to How to make symlink to new upgraded Perl?

Make your shebang line #!/usr/bin/env perl and then whichever perl is found first in your PATH environment variable will be the one used. perlbrew is its own beast. You put some perlbrew vars in your profile script, then perlbrew manages multiple perl installations. Try 'perlbrew available', 'perlbrew install 5.22.0' and then 'perlbrew switch 5.22.0'. If you did it right, `which perl`, should show that you are using one of the perlbrew managed perls.

Each Perl installation by default will have a compiled @INC that refers to its own local installed modules. So generally if you don't mess around with it, every installation will maintain its own modules. The overall goal is that all you have to do is either use perlbrew to switch between perls or change your PATH variable. If you think that is a worthy goal you will not use /usr/bin/perl in your shebang lines, nor /home/perl5/perlbrew/perls/perl-5.20.1/bin/perl because that will tie you to that file.

By default the ln command makes a hard link which is a pointer to the original file. You cannot span file systems with hard links. You probably want the '-s' option, which is a symbolic/soft link. Accomplishes same thing, but extra lookup. If you have two hard links to a file, deleting one will just decrease your link count by one. You will still be able to access using the other one. With two soft links, deleting the real file will cause the soft link to not work.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-18 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found