oops, associated_methods returns an arrayref of method objects
Jesse Luehrs [Thu, 5 Nov 2009 00:09:50 +0000 (18:09 -0600)]
lib/Moose/Meta/Attribute.pm

index 7490320..fe6193a 100644 (file)
@@ -658,7 +658,9 @@ sub remove_delegation {
     my %handles = $self->_canonicalize_handles;
     my $associated_class = $self->associated_class;
     foreach my $handle (keys %handles) {
-        next unless any { $handle eq $_ } $self->associated_methods;
+        next unless any { $handle eq $_ }
+                    map { $_->name }
+                    @{ $self->associated_methods };
         $self->associated_class->remove_method($handle);
     }
 }