Add explicit return values for (almost) all native delegation mutating methods
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Counter / set.pm
index e6c00bd..4c3628b 100644 (file)
@@ -15,6 +15,7 @@ with 'Moose::Meta::Method::Accessor::Native::Writer' => {
             _minimum_arguments
             _maximum_arguments
             _inline_optimized_set_new_value
+            _return_value
             )
     ]
 };
@@ -30,6 +31,12 @@ sub _inline_optimized_set_new_value {
     return "$slot_access = \$_[0];";
 }
 
+sub _return_value {
+    my ( $self, $slot_access ) = @_;
+
+    return "return $slot_access;";
+}
+
 no Moose::Role;
 
 1;