Fix RT #54203 (reported by chocolateboy) that setters might return undef.
[gitmo/Mouse.git] / xs-src / MouseAccessor.xs
index 2d26088..909e595 100644 (file)
@@ -132,7 +132,7 @@ mouse_attr_set(pTHX_ SV* const self, MAGIC* const mg, SV* value){
         value = mouse_xa_apply_type_constraint(aTHX_ MOUSE_mg_xa(mg), value, flags);
     }
 
-    set_slot(self, slot, value);
+    value = set_slot(self, slot, value);
 
     if(flags & MOUSEf_ATTR_IS_WEAK_REF){
         weaken_slot(self, slot);