[svn:ponie] r337 - in trunk/perl: . pod

[email protected] 11 Aug 2005 09:49:00 -0000
Newsgroups perl.ponie.changes
Message-ID <[email protected]>
Author: nicholas
Date: Thu Aug 11 02:48:59 2005
New Revision: 337

Modified:
   trunk/perl/pod/perlrun.pod
   trunk/perl/toke.c
Log:
Remove the code that redispatches the #! line if it fails to match /perl/


Modified: trunk/perl/pod/perlrun.pod
==============================================================================
--- trunk/perl/pod/perlrun.pod	(original)
+++ trunk/perl/pod/perlrun.pod	Thu Aug 11 02:48:59 2005
@@ -94,12 +94,6 @@ getting whatever version is first in the
 a specific version of Perl, say, perl5.005_57, you should place
 that directly in the #! line's path.
 
-If the #! line does not contain the word "perl", the program named after
-the #! is executed instead of the Perl interpreter.  This is slightly
-bizarre, but it helps people on machines that don't do #!, because they
-can tell a program that their SHELL is F</usr/bin/perl>, and Perl will then
-dispatch the program to the correct interpreter for them.
-
 After locating your program, Perl compiles the entire program to an
 internal form.  If there are any compilation errors, execution of the
 program is not attempted.  (This is unlike the typical shell script,

Modified: trunk/perl/toke.c
==============================================================================
--- trunk/perl/toke.c	(original)
+++ trunk/perl/toke.c	Thu Aug 11 02:48:59 2005
@@ -2823,37 +2823,6 @@ Perl_yylex(pTHX)
 			*s = '#';	/* Don't try to parse shebang line */
 		}
 #endif /* ALTERNATE_SHEBANG */
-#ifndef MACOS_TRADITIONAL
-		if (!d &&
-		    *s == '#' &&
-		    ipathend > ipath &&
-		    !PL_minus_c &&
-		    !instr(s,"indir") &&
-		    instr(PL_origargv[0],"perl"))
-		{
-		    char **newargv;
-
-		    *ipathend = '\0';
-		    s = ipathend + 1;
-		    while (s < PL_bufend && isSPACE(*s))
-			s++;
-		    if (s < PL_bufend) {
-			Newz(899,newargv,PL_origargc+3,char*);
-			newargv[1] = s;
-			while (s < PL_bufend && !isSPACE(*s))
-			    s++;
-			*s = '\0';
-			Copy(PL_origargv+1, newargv+2, PL_origargc+1, char*);
-		    }
-		    else
-			newargv = PL_origargv;
-		    newargv[0] = ipath;
-		    PERL_FPU_PRE_EXEC
-		    PerlProc_execv(ipath, EXEC_ARGV_CAST(newargv));
-		    PERL_FPU_POST_EXEC
-		    Perl_croak(aTHX_ "Can't exec %s", ipath);
-		}
-#endif
 		if (d) {
 		    U32 oldpdb = PL_perldb;
 		    bool oldn = PL_minus_n;