From: Aaron Crane Date: Thu, 23 Mar 2017 10:16:31 +0000 (+0000) Subject: Avoid List::MoreUtils X-Git-Tag: 5.90116~8^2~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=3afa2d52e5687b1aef51ddf845162db4a0500f1f Avoid List::MoreUtils 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. --- diff --git a/Makefile.PL b/Makefile.PL index 68dd556..f4d5a0a 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -26,7 +26,7 @@ author 'Sebastian Riedel '; 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'; diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 178d502..4bc7460 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -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; diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index fbab60f..f478ddf 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -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 {