From: Hans Dieter Pearcey Date: Mon, 7 Feb 2011 22:29:17 +0000 (-0500) Subject: notes on weak_ref (based on patch from Sam Vilain) X-Git-Tag: 1.9903~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=63c52045a6e9e316e13d49b4a944310972426f69;p=gitmo%2FMoose.git notes on weak_ref (based on patch from Sam Vilain) --- diff --git a/lib/Moose.pm b/lib/Moose.pm index 9912e2c..1ffc14a 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -474,7 +474,8 @@ say anything about the attribute's value, which can be C. This will tell the class to store the value of this attribute as a weakened reference. If an attribute is a weakened reference, it B also be -coerced. +coerced. Note that when a weak ref expires, the attribute is still considered +to be set for purposes of predicate, default, etc. =item I (1|0)> @@ -682,6 +683,8 @@ information. Creates a method to perform a basic test to see if a value has been set in the attribute. See the L for more information. +Note that the predicate will return true even for a C attribute whose +value has expired. =item I => (0|1)