set the attr in rebless_instance when it has no init_arg
Yuval Kogman [Sat, 12 Apr 2008 15:02:50 +0000 (15:02 +0000)]
lib/Class/MOP/Class.pm

index e299e53..d2c9eef 100644 (file)
@@ -431,7 +431,7 @@ sub rebless_instance {
                     unless exists $params{$init_arg};
             } 
             else {
-                $attr->set_value($instance);
+                $attr->set_value($instance, $attr->get_value($instance));
             }
         }
     }