projects
/
gitmo/Mouse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
0b3ce17
)
added Meta::Class->has_method($name)
Tokuhiro Matsuno [Tue, 10 Mar 2009 17:54:43 +0000 (
02:54
+0900)]
lib/Mouse/Meta/Class.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Mouse/Meta/Class.pm
b/lib/Mouse/Meta/Class.pm
index
0eb22ec
..
f4a94e4
100644
(file)
--- 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;