1 package Moose::Meta::Method::Accessor::Native::Array::insert;
7 $VERSION = eval $VERSION;
8 our $AUTHORITY = 'cpan:STEVAN';
12 with 'Moose::Meta::Method::Accessor::Native::Array::Writer' => {
18 _inline_optimized_set_new_value
23 sub _minimum_arguments { 2 }
25 sub _maximum_arguments { 2 }
27 sub _adds_members { 1 }
29 sub _potential_value {
30 my ( $self, $slot_access ) = @_;
33 "( do { my \@potential = \@{ $slot_access }; splice \@potential, \$_[0], 0, \$_[1]; \\\@potential } )";
36 sub _new_members { '$_[1]' }
38 sub _inline_optimized_set_new_value {
39 my ( $self, $inv, $new, $slot_access ) = @_;
41 return "splice \@{ $slot_access }, \$_[0], 0, \$_[1];";