Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I need my own perl on Debian production systems, so I install it into /opt. I was about to edit root's .profile and add:

export PATH=/opt/perl/bin:$PATH

when a chill breeze blew across the back of my neck and I thought maybe I should ask here: what sorts of problems (if any) might that cause on the system?

  • Comment on After installing my own perl into /opt, is it ok to set root's PATH so /opt/perl/bin/perl comes before /usr/bin/perl? (Debian)
  • Download Code

Replies are listed 'Best First'.
Re: After installing my own perl into /opt, is it ok to set root's PATH so /opt/perl/bin/perl comes before /usr/bin/perl? (Debian)
by Corion (Patriarch) on Nov 10, 2009 at 08:22 UTC

    In my opinion, root should only use the system Perl. But if you're careful with always using the "correct", fully qualified hashbang line (#!/opt/perl/... or #!/usr/bin/perl) instead of using perl -w ... from the command line, and all shell scripts also do that, you should be fine. But I'd still leave the system Perl the "standard" Perl and explicitly call the other Perl.