Bump to 0.56
[gitmo/Moose.git] / lib / Moose / Meta / Role.pm
index fd437ca..640cb84 100644 (file)
@@ -6,9 +6,9 @@ use warnings;
 use metaclass;
 
 use Carp         'confess';
-use Scalar::Util 'blessed', 'reftype';
+use Scalar::Util 'blessed';
 
-our $VERSION   = '0.14';
+our $VERSION   = '0.56';
 our $AUTHORITY = 'cpan:STEVAN';
 
 use Moose::Meta::Class;
@@ -357,10 +357,13 @@ sub alias_method {
         || confess "You must define a method name";
 
     my $body = (blessed($method) ? $method->body : $method);
-    ('CODE' eq (reftype($body) || ''))
+    ('CODE' eq ref($body))
         || confess "Your code block must be a CODE reference";
 
-    $self->add_package_symbol("&${method_name}" => $body);
+    $self->add_package_symbol(
+        { sigil => '&', type => 'CODE', name => $method_name },
+        $body
+    );
 }
 
 ## ------------------------------------------------------------------