Refactored native trait inlining some more - added an optimized path to avoid copying...
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Array / delete.pm
index c203026..c5aeea5 100644 (file)
@@ -25,7 +25,13 @@ sub _potential_value {
     my ( $self, $slot_access ) = @_;
 
     return
-        "( do { my \@potential = \@{ $slot_access }; splice \@potential, \$_[0], 1; \@potential } )";
+        "( do { my \@potential = \@{ $slot_access }; splice \@potential, \$_[0], 1; \\\@potential } )";
+}
+
+sub _inline_optimized_set_new_value {
+    my ( $self, $inv, $new, $slot_access ) = @_;
+
+    return "splice \@{ $slot_access }, \$_[0], 1;";
 }
 
 1;