Fix RT #54203 (reported by chocolateboy) that setters might return undef.
[gitmo/Mouse.git] / xs-src / MouseAccessor.xs
index b9aad70..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);
@@ -388,7 +388,7 @@ mouse_instance_weaken_slot(pTHX_ SV* const instance, SV* const slot) {
         sv_rvweaken(HeVAL(he));
     }
 }
-\r
+
 MODULE = Mouse::Meta::Method::Accessor::XS  PACKAGE = Mouse::Meta::Method::Accessor::XS
 
 PROTOTYPES:   DISABLE