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