Skip Menu |
 

This queue is for tickets about the List-MoreUtils CPAN distribution.

Report information
The Basics
Id: 120799
Status: resolved
Priority: 0/
Queue: List-MoreUtils

People
Owner: Nobody in particular
Requestors: sinan [...] unur.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.419



Subject: Makefile.PL fails due to unescaped paths interpolated in regex pattern
Date: Wed, 29 Mar 2017 22:57:15 -0400
To: bug-List-MoreUtils [...] rt.cpan.org
From: "A. Sinan Unur" <sinan [...] unur.com>
Download (untitled) / with headers
text/plain 1.1k
I get: $ perl Makefile.PL *** This version of List::MoreUtils conflicts with the version of List::MoreUtils (0.416) you have installed. It's strongly recommended that you carefully read the Changes file and test your application with this version before finally upgrading. See local::lib how to do it easily. *** Missing braces on \o{} in regex; marked by <-- HERE in m/^c:\o <-- HERE pt\perl\site\5.24.1\lib/ at Makefile.PL line 163. The reason for that is simple. On my install (Windows, perl built with Visual Studio '13 tools), I have: $ perl -MConfig -E "say $Config{installsitearch}" c:\opt\perl\site\5.24.1\lib When this string is interpolated in regex pattern, \o is taken to signify start of an octal escape sequence. The fix is to *always* apply quotemeta to file paths used in regex patterns. This frequently shows up when using Windows paths, but it is a bigger and more important issue on *nixy systems as well since a file path can contain almost any character on such systems. So, for example, on line 163, use m,^\Q$Config{installsitearch}, and ditto for other places where file paths are used in regex patterns. HTH, -- Sinan
Download (untitled) / with headers
text/plain 1.4k
On Thu Mar 30 00:12:03 2017, sinan@unur.com wrote: Show quoted text
> I get: > > $ perl Makefile.PL > *** > This version of List::MoreUtils conflicts with > the version of List::MoreUtils (0.416) you have installed. > > It's strongly recommended that you carefully read > the Changes file and test your application with > this version before finally upgrading. > > See local::lib how to do it easily. > *** > Missing braces on \o{} in regex; marked by <-- HERE in m/^c:\o <-- > HERE pt\perl\site\5.24.1\lib/ at Makefile.PL line 163. > > The reason for that is simple. On my install (Windows, perl built with > Visual Studio '13 tools), I have: > > $ perl -MConfig -E "say $Config{installsitearch}" > c:\opt\perl\site\5.24.1\lib > > When this string is interpolated in regex pattern, \o is taken to > signify start of an octal escape sequence. > > The fix is to *always* apply quotemeta to file paths used in regex > patterns. This frequently shows up when using Windows paths, but it is > a bigger and more important issue on *nixy systems as well since a > file path can contain almost any character on such systems. > > So, for example, on line 163, use > > m,^\Q$Config{installsitearch}, > > and ditto for other places where file paths are used in regex patterns. > > HTH, > > -- Sinan
Even better is to avoid regex, it's just the Perl hammer. Please apologize. Would you please try whether attached patch does for you?
Subject: patch-Makefile.PL
Download patch-Makefile.PL
text/x-perl 751b
diff --git a/Makefile.PL b/Makefile.PL index 8c06d97..de60918 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -160,11 +160,11 @@ sub CheckConflicts : sprintf($conflictMsg, $params{NAME}, $module, $installed, $params{NAME}); warn $warning; (my $modfile = "${module}.pm") =~ s,::,/,g; - if ($INC{$modfile} =~ m,^$Config{installsitearch},) + if (index($INC{$modfile}, $Config{installsitearch}) == 0) { push @killarch, $modfile; } - elsif ($INC{$modfile} =~ m,^$Config{installsitelib},) + elsif (index($INC{$modfile}, $Config{installsitelib}) == 0) { push @killsite, "${modfile}.pm"; }
Subject: Re: [rt.cpan.org #120799] Makefile.PL fails due to unescaped paths interpolated in regex pattern
Date: Thu, 30 Mar 2017 08:33:42 -0400
To: bug-List-MoreUtils [...] rt.cpan.org
From: "A. Sinan Unur" <sinan [...] unur.com>
Download (untitled) / with headers
text/plain 499b
On Thu, Mar 30, 2017 at 2:18 AM, Jens Rehsack via RT <bug-List-MoreUtils@rt.cpan.org> wrote: Show quoted text
> Would you please try whether attached patch does for you?
It works. Thank you. I am also going to suggest it might be a good idea to include a clearer explanation of the conflicts between 0.418 and 0.416. It is not obvious from the Changes file which specific item causes what kind of conflict. If there is a blog post or discussion about it, you might want to include the link in Changes. -- Sinan


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.