[Pkg-ace-devel] Magic Perl again
Thomas Girard
thomas.g.girard@free.fr
Wed, 29 Sep 2004 16:52:57 +0200
Hello all,
I've just realized that the add-magic-perl.sh script prevents mwc.pl and
mpc.pl from working... Attempting to run them here gives me a :
> tgg@aspire:~$ mwc.pl
> /bin/sh: -w: invalid option
> Usage: /bin/sh [GNU long option] [option] ...
> /bin/sh [GNU long option] [option] script-file ...
> GNU long options:
> --debug
> --dump-po-strings
> --dump-strings
> --help
> --init-file
> --login
> --noediting
> --noprofile
> --norc
> --posix
> --rcfile
> --restricted
> --verbose
> --version
> --wordexp
> Shell options:
> -irsD or -c command or -O shopt_option (invocation only)
> -abefhkmnptuvxBCHP or -o option
And:
> tgg@aspire:~$ sh -x mwc.pl
> + eval '(exit $?0)'
> ++ exit 00
> + eval 'exec perl -S $0 ${1+"$@"}'
> ++ exec perl -S mwc.pl
> /bin/sh: -S: invalid option
> Usage: /bin/sh [GNU long option] [option] ...
[...] then like above.
Can someone please confirm this ? (Yes, I also have forgotten the `-w'
flag, but this doesn't change anything to the problem I'm depicting here).
I don't understand why *sh* is complaining about the `-S' flag while it
should have exec'd perl... perlrun(1) didn't help either.
Googling a bit gave me
http://www.inf.bme.hu/~pts/Magic.Perl.Header/magicc.txt, but all I get
from this is an big headache...
The Perl policy here
http://www.debian.org/doc/packaging-manuals/perl-policy/ch-programs.html#s-hash_bang
recommends using #!/usr/bin/perl, so what is the right thing to do ?
Thanks,
Thomas