From: Yuval Kogman Date: Sat, 12 Apr 2008 15:02:50 +0000 (+0000) Subject: set the attr in rebless_instance when it has no init_arg X-Git-Tag: 0_64~77 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b293f28b09250f3d06cd5527dea3a0b6e3a71533;p=gitmo%2FClass-MOP.git set the attr in rebless_instance when it has no init_arg --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index e299e53..d2c9eef 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -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)); } } }