You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by st...@apache.org on 2005/12/19 21:29:53 UTC

svn commit: r357780 - /perl/Apache-Test/trunk/lib/Apache/TestConfig.pm

Author: stas
Date: Mon Dec 19 12:29:49 2005
New Revision: 357780

URL: http://svn.apache.org/viewcvs?rev=357780&view=rev
Log:
- use $Config{'startperl'} as a shebang if perlpath is too long, 
- add references to the shebang issues in case someone wants to understand why 
this change was done

Modified:
    perl/Apache-Test/trunk/lib/Apache/TestConfig.pm

Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=357780&r1=357779&r2=357780&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Mon Dec 19 12:29:49 2005
@@ -1043,10 +1043,12 @@
     # if perlpath is longer than 62 chars, some shells on certain
     # platforms won't be able to run the shebang line, so when seeing
     # a long perlpath use the eval workaround.
+    # see: http://en.wikipedia.org/wiki/Shebang
+    # http://homepages.cwi.nl/~aeb/std/shebang/
     my $shebang = length $Config{perlpath} < 62
         ? "#!$Config{perlpath}\n"
         : <<EOI;
-#!/usr/bin/perl
+$Config{'startperl'}
     eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
         if \$running_under_some_shell;
 EOI