On Mon, Jul 04, 2011 at 08:55:19PM +0300, Gabor Szabo wrote: > One of the difficulties of having multiple installations of perl is > that some code runs > external scripts using "perl path/to/file param" instead of "$^X > path/to/file param" > > I though I'd try to change the setup of my CPAN smoker to try to catch > these cases. > I thought of two strategies: > > 2) On Linux it would be harder to eliminate perl from the PATH as the > system might need it. > So change the PATH so the "perl" that is the first in the path will > be some small application > that will display an error message and exit. > > I wrote a small piece of C code to do 2 and now I am running the smoke test. > I wonder if anyone else here has done something similar. What are the > experiences and what are the pitfalls?
#!/bin/sh echo This is not the perl you\'re looking for >&2 No C required! -- David Cantrell | Reality Engineer, Ministry of Information What a lovely day! Now watch me spoil it for you.