Refactored native trait inlining some more - added an optimized path to avoid copying...
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / String / clear.pm
index 2acebea..95ea12b 100644 (file)
@@ -18,15 +18,10 @@ sub _potential_value {
     return "q{}";
 }
 
-sub _inline_set_new_value {
-    my ( $self, $inv, $new ) = @_;
+sub _inline_optimized_set_new_value {
+    my ( $self, $inv, $new, $slot_access ) = @_;
 
-    return $self->SUPER::_inline_set_new_value(@_)
-        if $self->_value_needs_copy;
-
-    my $slot_access = $self->_inline_get($inv);
-
-    return "${slot_access} = q{}";
+    return "$slot_access = q{};";
 }
 
 1;