From: Charles McGarvey Date: Fri, 18 Jan 2013 06:02:50 +0000 (-0700) Subject: improve handling of spaces in build args X-Git-Tag: v0.03~3 X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=2c02694aaa9e02740bfd1f127d7dc676f816d54f;p=chaz%2Fp5-Alien-ZMQ improve handling of spaces in build args --- diff --git a/inc/My/Build.pm b/inc/My/Build.pm index 33bfc2b..b582c91 100644 --- a/inc/My/Build.pm +++ b/inc/My/Build.pm @@ -102,9 +102,9 @@ END # use -I and -L flag arguments as extra search directories my $inc = `$pkg_config $pkg --cflags-only-I`; - push @inc_search, map { s/^-I//; $_ } split(/\s+/, $inc); + push @inc_search, map { s/^-I//; $_ } $cb->split_like_shell($inc); my $lib = `$pkg_config $pkg --libs-only-L`; - push @lib_search, map { s/^-L//; $_ } split(/\s+/, $lib); + push @lib_search, map { s/^-L//; $_ } $cb->split_like_shell($lib); last; } @@ -153,6 +153,7 @@ END sub install_zeromq { my $self = shift; + my $cb = $self->cbuilder; can_run("libtool") or die "The libtool command cannot be found"; @@ -182,7 +183,7 @@ sub install_zeromq { my $srcdir = catdir($basedir, "zeromq-$version"); say "Configuring..."; - my @config = split(/\s/, $self->args('zmq-config') || ""); + my @config = $cb->split_like_shell($self->args('zmq-config') || ""); chdir $srcdir; run(command => ["./configure", "--prefix=$prefix", @config]) or die "Failed to configure ØMQ";