From: Chris Prather Date: Wed, 29 Apr 2009 02:13:50 +0000 (-0400) Subject: remove code stole from List::MoreUtils since we use it everywhere it's a dep now X-Git-Tag: 0.77~30 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7128d9e1a4fa6f08cb3b43b5c7be1bba5ab79755;p=gitmo%2FMoose.git remove code stole from List::MoreUtils since we use it everywhere it's a dep now --- diff --git a/lib/Moose/Meta/Role/Application/RoleSummation.pm b/lib/Moose/Meta/Role/Application/RoleSummation.pm index d7afd4d..75cfe2d 100644 --- a/lib/Moose/Meta/Role/Application/RoleSummation.pm +++ b/lib/Moose/Meta/Role/Application/RoleSummation.pm @@ -5,6 +5,7 @@ use warnings; use metaclass; use Scalar::Util 'blessed'; +use List::MoreUtils qw(uniq); use Moose::Meta::Role::Composite; @@ -59,9 +60,6 @@ sub is_aliased_method { exists $aliased_names{$method_name} ? 1 : 0; } -# stolen from List::MoreUtils ... -my $uniq = sub { my %h; map { $h{$_}++ == 0 ? $_ : () } @_ }; - sub check_role_exclusions { my ($self, $c) = @_; @@ -91,7 +89,7 @@ sub check_role_exclusions { sub check_required_methods { my ($self, $c) = @_; - my %all_required_methods = map { $_ => undef } $uniq->(map { + my %all_required_methods = map { $_ => undef } uniq(map { $_->get_required_method_list } @{$c->get_roles});