From: Jesse Luehrs Date: Sat, 17 Sep 2011 18:42:08 +0000 (-0500) Subject: simpler get_all_method_names implementation X-Git-Tag: 2.0300~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=52a6510c87c1b1fa96a6d503f2daa19c058a308d;p=gitmo%2FMoose.git simpler get_all_method_names implementation --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index f8f671b..f7cf3d7 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -1131,12 +1131,7 @@ sub get_all_methods { sub get_all_method_names { my $self = shift; - my %uniq; - - return - grep { !$uniq{$_}++ } - map { Class::MOP::Class->initialize($_)->get_method_list } - $self->linearized_isa, 'UNIVERSAL'; + map { $_->name } $self->get_all_methods; } sub find_all_methods_by_name {