[Moose-commits] r7570 - in Mouse/trunk: . lib/Mouse/Meta

sartak at code2.0beta.co.uk sartak at code2.0beta.co.uk
Thu Feb 5 21:22:11 GMT 2009


Author: sartak
Date: 2009-02-05 13:22:11 -0800 (Thu, 05 Feb 2009)
New Revision: 7570

Modified:
   Mouse/trunk/Changes
   Mouse/trunk/lib/Mouse/Meta/Class.pm
Log:
Implement get_all_method_names

Modified: Mouse/trunk/Changes
===================================================================
--- Mouse/trunk/Changes	2009-02-05 21:19:39 UTC (rev 7569)
+++ Mouse/trunk/Changes	2009-02-05 21:22:11 UTC (rev 7570)
@@ -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'

Modified: Mouse/trunk/lib/Mouse/Meta/Class.pm
===================================================================
--- Mouse/trunk/lib/Mouse/Meta/Class.pm	2009-02-05 21:19:39 UTC (rev 7569)
+++ Mouse/trunk/lib/Mouse/Meta/Class.pm	2009-02-05 21:22:11 UTC (rev 7570)
@@ -88,6 +88,14 @@
     $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;




More information about the Moose-commits mailing list