From 5a04aac43d82e938aa8c048274a0e4e842595586 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 22 Oct 2001 12:05:35 +0000 Subject: [PATCH] Integrate change #12560 from maintperl; make pl2bat use %0 rather than "%0" (the latter fails to work in a lot of common cases) p4raw-link: @12560 on //depot/maint-5.6/perl: f7451daad24bee267a6c7292f49dce0eb5051b3d p4raw-id: //depot/perl@12562 p4raw-integrated: from //depot/maint-5.6/perl@12561 'copy in' win32/bin/pl2bat.pl (@5902..) --- win32/bin/pl2bat.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/win32/bin/pl2bat.pl b/win32/bin/pl2bat.pl index cdbac6f..6e0f166 100644 --- a/win32/bin/pl2bat.pl +++ b/win32/bin/pl2bat.pl @@ -13,7 +13,7 @@ Usage: $0 [-h] or: $0 [-w] [-u] [-n ntargs] [-o otherargs] [-s stripsuffix] [files] -n ntargs arguments to invoke perl with in generated file when run from Windows NT. Defaults to - '-x -S "%0" %*'. + '-x -S %0 %*'. -o otherargs arguments to invoke perl with in generated file other than when run from Windows NT. Defaults to '-x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9'. @@ -33,7 +33,8 @@ EOT my %OPT = (); warn($usage), exit(0) if !getopts('whun:o:a:s:',\%OPT) or $OPT{'h'}; -$OPT{'n'} = '-x -S "%0" %*' unless exists $OPT{'n'}; +# NOTE: %0 is already enclosed in doublequotes by cmd.exe, as appropriate +$OPT{'n'} = '-x -S %0 %*' unless exists $OPT{'n'}; $OPT{'o'} = '-x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9' unless exists $OPT{'o'}; $OPT{'s'} = '/\\.plx?/' unless exists $OPT{'s'}; $OPT{'s'} = ($OPT{'s'} =~ m#^/([^/]*[^/\$]|)\$?/?$# ? $1 : "\Q$OPT{'s'}\E"); @@ -316,7 +317,7 @@ deprecated C<-a> option. =item B<-n> I Arguments to invoke perl with in generated batch file when run from -Windows NT (or Windows 98, probably). Defaults to S<'-x -S "%0" %*'>. +Windows NT (or Windows 98, probably). Defaults to S<'-x -S %0 %*'>. =item B<-o> I -- 2.7.4