Messages in this thread | | | Date | Mon, 22 Mar 1999 18:38:53 +1100 (EST) | From | Nathan Hand <> | Subject | Re: #!perl - alternative path to script interpreters - patch to 2.2 |
| |
On 21 Mar 1999, david parsons wrote:
> A patch where #! /usr/bin/perl behaved like it does right now, > complete with mysterious errors when perl isn't in /usr/bin, but > where #! perl will pick up perl from anyoldplace would break the > world how?
The alternative already suggested, as used by DG-UX, has all of the benefits and apparently none of the losses. You specify a full path which is the default. If there isn't an interpreter in that path it instead looks for the interpreter's basename in your PATH.
This allows each user to specify their own search path, and you can even override it on a script-by-script basis. And I like user space solutions, like the already mentioned #!/usr/bin/env trick, as they achieve much the same functionality without a kernel patch.
I agree that features shouldn't be abandoned just because the other unices are slow, but the posted patch isn't the best way to get the desired feature. The DG-UX kernel hack and the #!/usr/ben/env trick are both I think more elegant ways to address the problem.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |