From: Yuval Kogman Date: Fri, 15 Aug 2008 18:55:52 +0000 (+0000) Subject: simplify has_method check X-Git-Tag: 0_64_01~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a474a03f00135ee9033203dc2170769fc69fae2;p=gitmo%2FClass-MOP.git simplify has_method check --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index d409156..1f86040 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -720,8 +720,7 @@ sub has_method { (defined $method_name && $method_name) || confess "You must define a method name"; - return 0 unless exists $self->get_method_map->{$method_name}; - return 1; + exists $self->get_method_map->{$method_name}; } sub get_method {