Author: schwern
Date: Thu Sep 18 03:16:23 2008
New Revision: 11810
Modified:
Module-Build/trunk/lib/Module/Build/Platform/Windows.pm
Log:
system(@cmd) does not like having double quotes in the command on Strawberry
Perl. I couldn't figure out how to quote it.
Revert to quoting the command and using single-arg system. We know that works.
Modified: Module-Build/trunk/lib/Module/Build/Platform/Windows.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Platform/Windows.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Platform/Windows.pm Thu Sep 18
03:16:23 2008
@@ -256,6 +256,23 @@
return @argv;
}
+
+# system(@cmd) does not like having double-quotes in it on Windows.
+# So we quote them and run it as a single command.
+sub do_system {
+ my ($self, @cmd) = @_;
+
+ my $cmd = $self->_quote_args(@cmd);
+ my $status = system($cmd);
+ if ($status and $! =~ /Argument list too long/i) {
+ my $env_entries = '';
+ foreach (sort keys %ENV) { $env_entries .= "$_=>".length($ENV{$_})."; " }
+ warn "'Argument list' was 'too long', env lengths are $env_entries";
+ }
+ return !$status;
+}
+
+
1;
__END__