From: Shawn M Moore Date: Thu, 5 Feb 2009 21:22:11 +0000 (+0000) Subject: Implement get_all_method_names X-Git-Tag: 0.19~39 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=60cfc6ad27be2d551ceb69753ac9b2c67e52c6f7;p=gitmo%2FMouse.git Implement get_all_method_names --- diff --git a/Changes b/Changes index 5e66bbf..af351aa 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for Mouse 0.16 + * Implement get_all_method_names 0.15 Thu Feb 5 11:44:05 2009 * Don't export Mouse's sugar into the package 'main' diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 7f2378d..fbb4bb9 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -88,6 +88,14 @@ sub get_method_list { $get_methods_for_class->($self, $self->name); } +sub get_all_method_names { + my $self = shift; + my %uniq; + return grep { $uniq{$_}++ == 0 } + map { $get_methods_for_class->(undef, $_) } + $self->linearized_isa; +} + sub add_attribute { my $self = shift; my $attr = shift;