On 10/30/2009 01:38 PM, Eric Blake wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 10/30/2009 6:29 AM:
+eval '(exit $?0)'&& eval 'exec perl -wS "$0" ${1+"$@"}'
+& eval 'exec /usr/bin/perl -wS "$0" $argv:q'
shouldn't that be perl, rather than /usr/bin/perl?
I could not arrange for that 2nd eval line to make a difference,
so figured it'd be best to leave it as is.
Did you try: tcsh ./script? I'm wondering if that second eval is catering
to users who run SHELL=tcsh, since the script no longer has a shebang, and
tcsh has different rules on how to attempt scripts that lack a shebang.
Yeah, that looks like it. The "if $running_under_shell" to "if 0" is a
change that I did too yesterday.
I'd also change -wS to -S since the script can "use warnings" if it
wants, but shouldn't be forced to. Some other scripts use -0777 or -T.
In the end that would be
eval '(exit $?0)'&& eval 'exec perl -S "$0" ${1+"$@"}'
& eval 'exec perl -S "$0" $argv:q'
if 0;
Paolo