?RCS: $Id$ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: startperl.U,v $ ?RCS: Revision 3.0.1.1 1997/02/28 16:25:06 ram ?RCS: patch61: warn them if the #! line is too long for their OS ?RCS: ?RCS: Revision 3.0 1993/08/18 12:09:50 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: ?MAKE:startperl: cat rm sharpbang perlpath d_portable Myread ?MAKE: -pick add $@ %< ?S:startperl: ?S: This variable contains the string to put on the front of a perl ?S: script to make sure (hopefully) that it runs with perl and not some ?S: shell. Of course, that leading line must be followed by the classical ?S: perl idiom: ?S: eval 'exec perl -S $0 ${1+"$@"}' ?S: if $running_under_some_shell; ?S: to guarantee perl startup should the shell execute the script. Note ?S: that this magic incatation is not understood by csh. ?S:. ?C:STARTPERL: ?C: This symbol is the string that should be put on the front of a ?C: perl script to make sure (hopefully) that it runs with perl and ?C: not under some shell. That line should be followed by the classical ?C: invocation magic: ?C: eval 'exec perl -S $0 ${1+"$@"}' ?C: if $running_under_some_shell; ?C: to guarantee perl startup should the shell execute the script at first. ?C:. ?H:#define STARTPERL "$startperl" ?H:. ?T:pdflt ?F:!xtry : figure out how to guarantee perl startup case "$sharpbang" in *!) ?X: ?X: Make sure the #!$perlpath magic incantation indeed works on this ?X: system... It might not if the length of the #! hook is greater ?X: than some hardwired kernel limit. -- RAM, 15/03/96 ?X: $cat >xtry </dev/null 2>&1; then $cat <