develooper Front page | perl.perl5.porters | Postings from August 2016

Re: [perl #129152] mkpport adds quotes to $perl even if it's alreadyquoted

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
August 31, 2016 17:17
Subject:
Re: [perl #129152] mkpport adds quotes to $perl even if it's alreadyquoted
Message ID:
CA+vYcVwpy7jv_8uOKDE0Mo+UFeFouPM1XRXqqHm6h+YEzEtR3w@mail.gmail.com
On Wed, Aug 31, 2016 at 11:43 AM, James E Keenan via RT
<perlbug-followup@perl.org> wrote:
> On Wed Aug 31 07:38:33 2016, comdog wrote:
>> I'm compiling 5.25.4 from a path with a space character in it. It
>> fails from a double double quoting issue that tries to run a command
>> like:
>>
>> ""/Path/To Some/Place/perl"" ...
>>
>> which_perl from MakeMaker::Test::Utils returns a path already quoted,
>> like q("/Path/To Some/Place/perl"). The run subroutine in mkpport
>> checks for whitespace in $perl and adds another layer of double quotes
>> around the string if it finds whitespace. It should only do that if
>> the value doesn't already have those quotes.
>
> So, to confirm this problem, I created this directory:

Since you've got a test set-up handy, try replacing this line

  my $run = $perl =~ m/\s/ ? qq("$perl") : $perl;

from:

http://perl5.git.perl.org/perl.git/blob/HEAD:/mkppport#l140

with

  my $run = ($perl !~ m/^\"/) && ($perl =~ m/\s/) ? qq("$perl") : $perl;

and see if that prevents the double quoting.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About