From: Jarkko Hietaniemi Date: Sat, 9 Feb 2002 18:15:39 +0000 (+0000) Subject: Use the same escaping mechanism for all the *flags. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=03f2ffd895258305c1ea68d47825444da3615478;p=p5sagit%2Fp5-mst-13.2.git Use the same escaping mechanism for all the *flags. p4raw-id: //depot/perl@14612 --- diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm index ab85a13..eedb268 100644 --- a/lib/ExtUtils/Embed.pm +++ b/lib/ExtUtils/Embed.pm @@ -139,21 +139,26 @@ sub static_ext { @Extensions; } +sub _escape { + my $arg = shift; + $$arg =~ s/([\(\)])/\\$1/g; +} + sub _ldflags { my $ldflags = $Config{ldflags}; - $ldflags =~ s/([\(\)])/\\$1/g; + _escape(\$ldflags); return $ldflags; } sub _ccflags { my $ccflags = $Config{ccflags}; - $ccflags =~ s/([\(\)])/\\$1/g; + _escape(\$ccflags); return $ccflags; } sub _ccdlflags { my $ccdlflags = $Config{ccdlflags}; - $ccdlflags =~ s/([\(\)])/\\$1/g; + _escape(\$ccdlflags); return $ccdlflags; }