Add type constraint
[gitmo/Mouse.git] / lib / Mouse / Meta / Role.pm
index 5f8f567..95bdca8 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env perl
 package Mouse::Meta::Role;
 use strict;
 use warnings;
@@ -62,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;