X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FMixin%2FHasMethods.pm;h=b8ea9ffb6e2490efe0276309a32f8bdb56cffdd4;hb=fe1b970ae7d324629fd8848c1c640940c87ecfb5;hp=bc5b09c0b398e20d9e48f40b21e8403326a76f2c;hpb=ea6dca1713c5f12a07e165b0e5d70b9455682414;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Mixin/HasMethods.pm b/lib/Class/MOP/Mixin/HasMethods.pm index bc5b09c..b8ea9ff 100644 --- a/lib/Class/MOP/Mixin/HasMethods.pm +++ b/lib/Class/MOP/Mixin/HasMethods.pm @@ -156,6 +156,18 @@ sub get_method_list { keys %{$namespace}; } +# This should probably be what get_method_list actually does, instead of just +# returning names. This was created as a much faster alternative to +# $meta->get_method($_) for $meta->get_method_list +sub _get_local_methods { + my $self = shift; + + my $namespace = $self->namespace; + + return map { $self->get_method($_) } grep { *{ $namespace->{$_} }{CODE} } + keys %{$namespace}; +} + 1; __END__