Your skill will accomplish what the force of many cannot |
|
PerlMonks |
2nd Perl installation on Mac OSXby sanjuro (Novice) |
on Jun 25, 2009 at 20:39 UTC ( [id://774828]=perlquestion: print w/replies, xml ) | Need Help?? |
sanjuro has asked for the wisdom of the Perl Monks concerning the following question: Hello Monks, I have a question about using a second Perl installation on a MacOSX system (Leopard). What I've gleaned about MacOSX on this forum and others is that messing around with the default (i.e. /usr/bin/perl) installation of Perl on a Mac could lead to system breakage. I am interested in messing around with Perl, possibly up to the point of breakage, and I don't want to mess the operating system up. So it seems that the most prudent option is to go with a second installation (I'm assuming in /usr/local/bin/perl). The small complication is that the perl scripts developed on my mac will probably eventually get put on a linux server and I would prefer not to have to remember to modify the scripts themselves to make sure they work as executables on the server. I have outlined a few options below, along with their pros and cons, but would love some input on any options or consequences that I have missed: 1. Make an alias like perl=/usr/local/bin/perl and always run scripts by typing "perl scriptname". This means I don't have to change the #!/usr/bin/perl line in my scripts and there is no danger of the operating system using the wrong perl installation. 2. Use a #!/usr/local/bin/perl or a use lib statement in all of my perl scripts. The downside is that I would have to remember to change them when I put them up on the server, which I'm sure I would forget to do on a regular basis. 3. Change the PATH variable to search /usr/local/bin before /usr/bin. I am worried that this would also point the operating system to the new perl installation and could break things in the same way as modifying the standard perl installation might. Does anyone have any suggestions or comments? Thanks!!! Sanjuro
Back to
Seekers of Perl Wisdom
|
|