Should we have programs with executable permissions in the distro

Nicholas Clark nick at ccl4.org
Sun Aug 1 13:39:08 UTC 2010


On Sun, Aug 01, 2010 at 11:34:34PM +1000, Vasily Chekalkin wrote:
> >> Does it have any disadvantage to set it from "#! perl" to
> >> "#!/usr/bin/perl"?
> >>
> >> Also: "#! parrot"  ->  "#!/usr/bin/parrot"
> >>
> >> This is my favorite.
> >
> > Surely the #! for perl should be the path of the perl used to run Configure.pl,
> > and the #! for parrot be the path parrot will be installed to?
> >
> > /usr/bin/perl and /usr/bin/parrot may not even exist.
> 
> Indeed. What about "#!/usr/bin/env perl"? I'm not sure how it works on Windows.

I don't know for sure about Windows. I believe that interpreter choice is
determined by looking up the extension in the registry, but I may well be
wrong. (#! line and file permissions are not used)

However, I believe that this will still cause problems on *nix in a couple of
cases:

1: perl isn't on your $PATH
2: The first perl on your $PATH isn't new enough

whereas the path of the perl you ran won't suffer from either problem
(Configure.pl will reject if early if it's too old.)

Nicholas Clark


More information about the parrot-dev mailing list