Use blessed not ref
Shawn M Moore [Sat, 30 May 2009 19:19:05 +0000 (15:19 -0400)]
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,
             );