[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Script interpreter locations

Urgh, I just finished reading the thread on linux-kernel about this.
It's pretty hard to make a case for the #!perl kludge.  Neat kernel
hack.  Bad idea.

  If your scripts run on multiple OSes, then you must use the eval
  hack or the sysadmin provides a site-wide path for interpreters.
  (We have /usr/local/bin/perl on all Unix systems here.)

  If your scripts only need to run on Linux, use the FHS-specified
  path.  This is needed for scripts included with the distribution.
  (And indeed, all of my distribution-provided perl scripts do the
  right thing: #!/usr/bin/perl)

Since #!perl could only going to work on some Linux systems (not all),
and won't work on other OSes, it doesn't add any real value.  It
damages portability more than anything else.

And I agree with Larry that developers need to be prepared for perl to
be anywhere.

- Dan

P.S. When you want to be cool and hack in the kernel, every problem
     looks like a kernel problem?

Reply to: