[Module::Build] Array form of do_system causing problems
Status: Beta
Brought to you by:
kwilliams
|
From: Chris D. <ch...@cl...> - 2003-10-16 22:11:24
|
I build packages like this:
Build dist gzip="gzip -f --best"
This causes Module::Build::Platform::Unix to emit:
$self->do_system("gzip -f --best", "$dir.tar");
which bombs because there is no program called "gzip -f --best".
Perhaps do_system should check if there are spaces in the name of the
executable? That might not be the right thing on a Windows box, or any
other platform where spaces commonly occur in directory names...
Regardless of that complication, here's a new version of do_system. It
fixes the bug, but reintroduces the shell complications we were trying
to avoid.
sub do_system {
my ($self, @cmd) = @_;
print "@cmd\n";
if ($cmd[0] =~ /\s/) {
return !system("@cmd");
} else {
return !system(@cmd);
}
}
Chris
--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, 211 S Paterson Suite 260, Madison WI 53703
|