develooper Front page | perl.perl5.porters | Postings from April 2018

Devel::PPPort with Visual Studio

From:
A. Sinan Unur
Date:
April 25, 2018 15:37
Subject:
Devel::PPPort with Visual Studio
Message ID:
CABbccAM+XUPWxwaaE=mryC3BfQn2-=8mTPbReybVn3OFjTTaGA@mail.gmail.com
Recent versions of Devel::PPPort on Windows with Visual Studio built
`perl` fail tests in t\mess.t because $0 is interpolated into regex
patterns without the use of quotemeta[1].

In this case, $0 contains `\` as directory separators.

This is necessary, because nmake tries to interpret part of a filename
as a command line argument if it contains `/` characters.

An easy fix is to use \Q$0\E instead of plain $0 in patterns.

Here's a test report:

http://www.cpantesters.org/cpan/report/e484fd2f-6c51-1014-9811-fe131a8368d1

HTH,

-- Sinan


[1]: https://www.nu42.com/2014/11/youve-gotta-quotemeta.html



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