Add VERSION section to pods
[gitmo/Mouse.git] / lib / Mouse / Meta / Module.pm
index 3069250..9e1787f 100755 (executable)
@@ -114,9 +114,12 @@ sub has_method {
     defined($method_name)
         or $self->throw_error('You must define a method name');
 
-    return 1 if $self->{methods}->{$method_name};
+    return 1 if $self->{methods}{$method_name};
 
-    my $code = do{ no strict 'refs'; *{$self->{package} . '::' . $method_name}{CODE} };
+    my $code = do{
+        no strict 'refs';
+        *{ $self->{package} . '::' . $method_name }{CODE};
+    };
 
     return $code && $self->_code_is_mine($code);
 }
@@ -130,7 +133,7 @@ sub get_method_body{
     return $self->{methods}{$method_name} ||= do{
         my $code = do{ no strict 'refs'; *{$self->{package} . '::' . $method_name}{CODE} };
 
-        $code && $self->_code_is_mine($code) && $code;
+        ($code && $self->_code_is_mine($code)) ? $code : undef;
     };
 }
 
@@ -316,6 +319,10 @@ __END__
 
 Mouse::Meta::Module - The base class for Mouse::Meta::Class and Mouse::Meta::Role
 
+=head1 VERSION
+
+This document describes Mouse version 0.37_06
+
 =head1 SEE ALSO
 
 L<Class::MOP::Class>