From: Dave Rolsky Date: Sun, 26 Sep 2010 05:19:16 +0000 (-0500) Subject: When generating inline_store code, don't weaken non-ref value on set X-Git-Tag: 1.15~72 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6e642c8f999a05c14972a86789e76b5eed3f25bd;p=gitmo%2FMoose.git When generating inline_store code, don't weaken non-ref value on set --- diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 640d1cc..342cbb6 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -587,7 +587,7 @@ sub inline_set { = $mi->inline_set_slot_value( $instance, $self->slots, $value ) . ";"; $code .= $mi->inline_weaken_slot_value( $instance, $self->slots, $value ) - . ";" + . " if ref $value;" if $self->is_weak_ref; return $code;