summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@engin.umich.edu>1997-07-06 12:10:22 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-08-07 00:00:00 +1200
commit68d58bca0a3bd388198ebac3493f3709490347a0 (patch)
treed32b2ee522c3ba4a67b4f3433bafd0481bbd68ae
parent4dd614da4d1132b957c4951dd00f64d81b89dc20 (diff)
downloadperl-68d58bca0a3bd388198ebac3493f3709490347a0.tar.gz
Minor fix for pl2bat.bat
A long time ago, on Tue, 24 Jun 1997 12:02:25 PDT, Warren Jones wrote: >Scripts created by pl2bat pass themselves to perl with "perl -x -X %0.bat". >Adding the ".bat" extension to %0 is unnecessary, since "perl -S" will >try this automatically. It makes the script impossible to run from >the MKS Korn shell, since that shell alway invokes batch files using >the full path and ".bat" extension. Thus perl ends up getting a file >name with *two* ".bat" extensions (foo.bat.bat) which doesn't work. >A patch follows. > >Also, does anyone know why pl2bat uses "%1 %2 %3 ..." rather than %* ? >Admittedly, all this dosish foolery is pretty lame. %* does not work with 4DOS/NT. I just found out it can be made to work there by setting C<ParameterChar = *> in the 4nt.ini file. Since using %* eliminates the 9 arg limit for perl bat files, I recommend this patch (which includes yours). Credited: Warren Jones <wjones@tc.fluke.com> p5p-msgid: 199707061843.OAA23874@aatma.engin.umich.edu
-rw-r--r--win32/bin/pl2bat.bat4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/bin/pl2bat.bat b/win32/bin/pl2bat.bat
index 7f5f39aa95..f9b4902a13 100644
--- a/win32/bin/pl2bat.bat
+++ b/win32/bin/pl2bat.bat
@@ -1,6 +1,6 @@
@rem = '--*-Perl-*--
@echo off
-perl -x -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
+perl -x -S %0 %*
goto endofperl
@rem ';
#!perl -w
@@ -8,7 +8,7 @@ goto endofperl
(my $head = <<'--end--') =~ s/^\t//gm;
@rem = '--*-Perl-*--
@echo off
- perl -x -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
+ perl -x -S %0 %*
goto endofperl
@rem ';
--end--