Anchor this same regex in Mouse::Meta::Role
Shawn M Moore [Tue, 9 Dec 2008 03:02:31 +0000 (03:02 +0000)]
lib/Mouse/Meta/Role.pm

index 2008581..95bdca8 100644 (file)
@@ -61,7 +61,7 @@ sub get_method_list {
     no strict 'refs';
     # Get all the CODE symbol table entries
     my @functions =
-      grep !/(?:has|with|around|before|after|blessed|extends|confess|excludes|meta|requires)/,
+      grep !/^(?:has|with|around|before|after|blessed|extends|confess|excludes|meta|requires)$/,
       grep { defined &{"${name}::$_"} }
       keys %{"${name}::"};
     wantarray ? @functions : \@functions;