# set
$code .= "\n" . '} else {';
- $code .= "\n" . $self->_inline_check_argument_count;
- $code .= "\n" . $self->_inline_process_arguments( $inv, $slot_access );
- $code
- .= "\n"
- . $self
- ->Moose::Meta::Method::Accessor::Native::Array::set::_inline_check_arguments;
-
- my $potential_value = $self->_potential_value($slot_access);
-
- $code .= "\n" . $self->_inline_copy_value( \$potential_value );
- $code .= "\n"
- . $self->_inline_tc_code(
- $potential_value,
- $slot_access,
- );
+ $code .= "\n" . $self->_writer_core( $inv, $slot_access );
- $code .= "\n" . $self->_inline_get_old_value_for_trigger($inv);
- $code .= "\n" . $self->_inline_capture_return_value($slot_access);
-
- $code .= "\n"
- . $self->_inline_set_new_value(
- $inv,
- $potential_value,
- $slot_access,
- );
-
- $code .= "\n" . $self->_inline_trigger( $inv, $slot_access, '@old' );
$code .= "\n" . $self->_inline_post_body(@_);
$code .= "\n}";
sub _adds_members {1}
-sub _potential_value {
- my ( $self, $slot_access ) = @_;
-
- return
- "( do { my \@potential = \@{ $slot_access }; \$potential[ \$_[0] ] = \$_[1]; \@potential } )";
-}
-
sub _new_members {'$_[1]'}
1;