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
Craig A. Berry
August 31, 2016 17:17
Re: [perl #129152] mkpport adds quotes to $perl even if it's alreadyquoted
Message ID:
On Wed, Aug 31, 2016 at 11:43 AM, James E Keenan via RT
<> 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;



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

and see if that prevents the double quoting.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About