Use blessed not ref
[gitmo/Moose.git] / lib / Moose / Meta / Role.pm
index 9f97f50..19c2a4e 100644 (file)
@@ -154,7 +154,7 @@ sub add_required_methods {
 
     for (@_) {
         my $method = $_;
-        if (!ref($method)) {
+        if (!blessed($method)) {
             $method = $self->required_method_metaclass->new(
                 name => $method,
             );