Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 63816
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: IRONCAMEL [...] cpan.org
Cc:
AdminCc:

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



Subject: installation fails when using lastest version of List::MoreUtils
The latest versions of List::MoreUtils (versions 0.28 and 0.29) break Perl::Critic. I have to drop down to List::MoreUtils version 0.26 to get Perl::Critic to install. This is probably not the fault of Perl::Critic, but I wanted to create this ticket to save some people the headache of trying to find out why Perl::Critic won't install
Subject: Re: [rt.cpan.org #63816] installation fails when using lastest version of List::MoreUtils
Date: Fri, 10 Dec 2010 21:05:01 -0600
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Thanks for figuring this out! I hadn't had time to investigate the cause of the failures reported by CPAN Testers yet. Nice to know where to look.
Patch committed as svn revision 4004 The proximate problem is that the behavior of all() when the list is empty has changed. Previous behavior (as of List::MoreUtils 0.26, anyway) was that all() with an empty list returned false. With List::MoreUtils it returns true. But the code relies on the old behavior. Unfortunately, what's really needed is first a review of the List::MoreUtils functions used by Perl::Critic, then protection of all affected functions. Or maybe just protect them all, to be truly paranoid.
Subject: Re: [rt.cpan.org #63816] installation fails when using lastest version of List::MoreUtils
Date: Sat, 11 Dec 2010 04:26:28 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Naveed Massjouni <naveedm9 [...] gmail.com>
On Sat, Dec 11, 2010 at 3:20 AM, Tom Wyant via RT <bug-Perl-Critic@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=63816 > > > Patch committed as svn revision 4004 > > The proximate problem is that the behavior of all() when the list is > empty has changed. Previous behavior (as of List::MoreUtils 0.26, > anyway) was that all() with an empty list returned false. With > List::MoreUtils it returns true. But the code relies on the old > behavior. > > Unfortunately, what's really needed is first a review of the > List::MoreUtils functions used by Perl::Critic, then protection of all > affected functions. Or maybe just protect them all, to be truly > paranoid. >
That's surprising that the List::MoreUtils logic changed for empty lists. This is confirmed in the Changes file and the source code of the latest List::MoreUtils modules. I would expect that this is going to break a lot of modules that depend on it. Funny enough, the current POD documentation of L::M still describes the old behavior. -Naveed
On Sat Dec 11 04:26:56 2010, naveedm9@gmail.com wrote: Show quoted text
> > That's surprising that the List::MoreUtils logic changed for empty > lists. This is confirmed in the Changes file and the source code of > the latest List::MoreUtils modules. I would expect that this is going > to break a lot of modules that depend on it. Funny enough, the > current POD documentation of L::M still describes the old behavior. > -Naveed
My read of List::MoreUtils says that of the functions actually used by Perl::Critic only all() and none() are affected. But testing shows that Perl::Critic 1.109 also fails with the new List::MoreUtils, not just 1.110_001. So we probably ought to release _something_ fairly soon. Whether it's 1.110_001 patched for this, or 1.109 patched for this I don't know. My read of Perl::Critic suggests that only ProhibitNoWarnings and ProhibitNoStrict are affected, and these were fixed in commit 4004. But I'm unsure about a couple of the modules: Miscellanea::ProhibitUselessNoCritic uses none(), which now returns true if the list is empty. It has no tests that I can find, and after trying to write one I can see why. I am unable to get it to fail, and I think I understand why it's OK, but I am unsure why it worked before Adam changed List::MoreUtils. Test::Perl::Critic::Policy uses both all() and none(). The all() use is OK, but I'm less sure about the none() uses, and in fact believe we will get odd behavior if anyone calls all_policies_ok( -policies => [] ), that is, with an explicit empty list as the -policies argument. A second pair of eyes on this would be all to the good. Tom