From: Tokuhiro Matsuno Date: Tue, 10 Mar 2009 17:54:43 +0000 (+0900) Subject: added Meta::Class->has_method($name) X-Git-Tag: 0.20~38 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=616d0d647c262785d52e0cef6bbac65ca9e65e49;p=gitmo%2FMouse.git added Meta::Class->has_method($name) --- diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 0eb22ec..f4a94e4 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -69,6 +69,12 @@ sub add_method { *{ $pkg . '::' . $name } = $code; } +sub has_method { + my $self = shift; + my $name = shift; + $self->name->can($name); +} + # copied from Class::Inspector my $get_methods_for_class = sub { my $self = shift;