From: Hans Dieter Pearcey Date: Wed, 24 Jun 2009 21:01:04 +0000 (-0400) Subject: associate methods installed by delegation X-Git-Tag: 0.84~36 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0bbd378f46854208c2c76eb72b194cb8a9c8134c;p=gitmo%2FMoose.git associate methods installed by delegation --- diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index d5852aa..01cf157 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -541,9 +541,7 @@ sub install_accessors { $self->SUPER::install_accessors(@_); $self->install_delegation if $self->has_handles; unless ( - # XXX handles should be in associated_methods - $self->has_handles - || @{ $self->associated_methods } + @{ $self->associated_methods } || ($self->_is_metadata || '') eq 'bare' ) { Carp::cluck( @@ -596,6 +594,7 @@ sub install_delegation { my $method = $self->_make_delegation_method($handle, $method_to_call); $self->associated_class->add_method($method->name, $method); + $self->associate_method($method); } }