From da7265e28350fae42a9173aae5d50cd004b88383 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Thu, 17 Jan 2013 23:10:29 -0700 Subject: [PATCH] add smarter shell-quoting in the cflags and libs functions --- lib/Alien/ZMQ.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Alien/ZMQ.pm b/lib/Alien/ZMQ.pm index 4c0e2f9..099edcc 100644 --- a/lib/Alien/ZMQ.pm +++ b/lib/Alien/ZMQ.pm @@ -4,6 +4,8 @@ package Alien::ZMQ; use warnings; use strict; +use String::ShellQuote qw/shell_quote/; + =head1 DESCRIPTION Upon installation, the target system is probed for the presence of libzmq. If @@ -118,7 +120,7 @@ is a shortcut for constructing a C<-I> flag using C. =cut sub cflags { - "-I'" . inc_dir . "'"; + "-I" . shell_quote(inc_dir); } =method libs @@ -129,7 +131,7 @@ a shortcut for constructing a C<-L> flag using C, plus C<-lzmq>. =cut sub libs { - "-L'" . lib_dir . "' -lzmq"; + "-L" . shell_quote(lib_dir) . " -lzmq"; } 1; -- 2.45.2