Avoid List::MoreUtils
Aaron Crane [Thu, 23 Mar 2017 10:16:31 +0000 (10:16 +0000)]
The latest version of this module has a confusing and hard-to-honour set of
licences, with different terms for code added in different versions.

The only use we make of it is the uniq() function. A routine with the same
behaviour is available in newer versions of List::Util, and we already
depend on older versions of *that* module. So depending on a recent enough
version of List::Util means that this change actually reduces the number of
non-core dependencies for users with a new enough version of Perl.

Makefile.PL
lib/Catalyst.pm
lib/Catalyst/Controller.pm

index 68dd556..f4d5a0a 100644 (file)
@@ -26,7 +26,7 @@ author 'Sebastian Riedel <sri@cpan.org>';
 authority('cpan:MSTROUT');
 all_from 'lib/Catalyst/Runtime.pm';
 
-requires 'List::MoreUtils';
+requires 'List::Util' => '1.45'; # for uniq()
 requires 'namespace::autoclean' => '0.28';
 requires 'namespace::clean' => '0.23';
 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903';
index 178d502..4bc7460 100644 (file)
@@ -27,7 +27,7 @@ use HTML::Entities;
 use Tree::Simple qw/use_weak_refs/;
 use Tree::Simple::Visitor::FindByUID;
 use Class::C3::Adopt::NEXT;
-use List::MoreUtils qw/uniq/;
+use List::Util qw/uniq/;
 use attributes;
 use String::RewritePrefix;
 use Catalyst::EngineLoader;
index fbab60f..f478ddf 100644 (file)
@@ -5,8 +5,7 @@ use Class::MOP;
 use Class::Load ':all';
 use String::RewritePrefix;
 use Moose::Util qw/find_meta/;
-use List::Util qw/first/;
-use List::MoreUtils qw/uniq/;
+use List::Util qw/first uniq/;
 use namespace::clean -except => 'meta';
 
 BEGIN {