Subject: | Patch to Fix makemakerflags Argument Processing |
Hi. I submitted a patch to fix the argument processing in IPC::Cmd. I tried to set makemakerflags with something like
"PREFIX=C:\Document and Settings\user\Application Data"
PREFIX="/cygdrive/c/Document and Settings/user/Application Data"
and it croaks with
'"PREFIX' is not a known MakeMaker parameter name.
or end up with
# MakeMaker ARGV: (q[PREFIX="/cygdrive/c/Document], q[and], q[Settings/user/Application], q[Data"])
PREFIX = "/cygdrive/c/Document
Although I think there should also some fix in ExtUtils::MakeMaker altogether to deal with paths containing spaces, but CPANPLUS should send a good arguments list, too.
This patch use the local shell backticks to split the arguments list, instead of splitting it by spaces. The rule is defined by the local shell. There is still a potential problem that arguments may not contain new line characters in this patch, but I think it is quite enough for daily use.
Please tell me if there is any problem. Thank you.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
diff -r -u CPANPLUS-0.055.orig/lib/CPANPLUS/inc/IPC/Cmd.pm CPANPLUS-0.055/lib/CPANPLUS/inc/IPC/Cmd.pm
- --- CPANPLUS-0.055.orig/lib/CPANPLUS/inc/IPC/Cmd.pm Tue Feb 22 22:14:12 2005
+++ CPANPLUS-0.055/lib/CPANPLUS/inc/IPC/Cmd.pm Wed Jun 29 10:25:08 2005
@@ -149,7 +149,7 @@
@command = map { if( /[<>|&]/ ) {
$special_chars++; $_;
} else {
- - [ split / +/ ]
+ [ split "\n", join "", `perl -e "print join '\n', \@ARGV;" $_` ]
}
} split( /\s*([<>|&])\s*/, $cmd );
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFCw3Izi9gubzC5S1wRAs19AJ4uRwNASv4phXB+g2WiK2VafPNCxgCfW3tb
iztJaBSrR/Yc96vFDpu4Hcw=
=BezX
-----END PGP SIGNATURE-----