From: Jesse Luehrs Date: Thu, 5 Nov 2009 00:09:50 +0000 (-0600) Subject: oops, associated_methods returns an arrayref of method objects X-Git-Tag: 0.93~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=684323b3669a4d2f774e5e4482e25ca9dd90d818;p=gitmo%2FMoose.git oops, associated_methods returns an arrayref of method objects --- diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 7490320..fe6193a 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -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); } }