On Mon, Mar 11, 2002 at 09:37:10AM +0000, Edward Avis wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Here's a relevant part of the output on Windows with verbosity on:
>
> Checking C:\Program Files\Perl\bin\perl.exe
> Executing C:\Program Files\Perl\bin\perl.exe
> Result: `'C:\Program' is not recognized as an internal or external
> command,
> operable program or batch file.
> '
>
> This looks like it would be fixable using the multi-argument form of
> system().
Something like that, yep. The relevent code is in
ExtUtils::MM_Win32->find_perl().
print "Executing $abs\n" if ($trace >= 2);
$val = `$abs -e "require $ver;" 2>&1`;
Using system() might be tricky because we need the result. We also
need to supress STDOUT. We could simply escape out whitespace. Try
this little patch:
--- lib/ExtUtils/MM_Win32.pm 17 Feb 2002 23:35:55 -0000 1.11
+++ lib/ExtUtils/MM_Win32.pm 11 Mar 2002 17:47:46 -0000
@@ -121,7 +121,8 @@
print "Checking $abs\n" if ($trace >= 2);
next unless $self->maybe_command($abs);
print "Executing $abs\n" if ($trace >= 2);
- $val = `$abs -e "require $ver;" 2>&1`;
+ (my($safe_abs) = $abs) =~ s{(\s)}{\\$1}g;
+ $val = `$safe_abs -e "require $ver;" 2>&1`;
if ($? == 0) {
print "Using PERL=$abs\n" if $trace;
return $abs;
the question is, should find_perl() return $abs or $safe_abs? Hmmm.
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
please remove your pants
we promise this won't hurt much
prepare for insertion
-- Fmh