_maximum_arguments
_inline_check_arguments
_inline_optimized_set_new_value
+ _return_value
)
],
};
my ( $self, $slot_access ) = @_;
return
- "( do { my \@potential = \@{ $slot_access }; splice \@potential, \$_[0], 1; \\\@potential } )";
+ "( do { my \@potential = \@{ $slot_access }; \@return = splice \@potential, \$_[0], 1; \\\@potential } )";
}
sub _inline_optimized_set_new_value {
my ( $self, $inv, $new, $slot_access ) = @_;
- return "splice \@{ $slot_access }, \$_[0], 1";
+ return "\@return = splice \@{ $slot_access }, \$_[0], 1";
+}
+
+sub _return_value {
+ my ( $self, $slot_access ) = @_;
+
+ return 'return $return[0];';
}
no Moose::Role;