From: Dave Rolsky Date: Fri, 24 Sep 2010 16:15:59 +0000 (-0500) Subject: Make array accessor follow same pattern as hash accessor X-Git-Tag: 1.15~108 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=299b3de8531248be5be658b8090400e243f13b89;p=gitmo%2FMoose.git Make array accessor follow same pattern as hash accessor --- diff --git a/lib/Moose/Meta/Method/Accessor/Native/Array/accessor.pm b/lib/Moose/Meta/Method/Accessor/Native/Array/accessor.pm index 54d7f40..cc5d244 100644 --- a/lib/Moose/Meta/Method/Accessor/Native/Array/accessor.pm +++ b/lib/Moose/Meta/Method/Accessor/Native/Array/accessor.pm @@ -62,11 +62,15 @@ sub _generate_method { $code .= "\n" . $self->_inline_get_old_value_for_trigger($inv); $code .= "\n" . $self->_inline_capture_return_value($slot_access); - $code - .= "\n" . $self->_inline_store( $inv, '[' . $potential_value . ']' ); + $code .= "\n" + . $self->_inline_set_new_value( + $inv, + $potential_value, + $slot_access, + ); - $code .= "\n" . $self->_inline_post_body(@_); $code .= "\n" . $self->_inline_trigger( $inv, $slot_access, '@old' ); + $code .= "\n" . $self->_inline_post_body(@_); $code .= "\n}"; $code .= "\n}";