X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FManual%2FAttributes.pod;h=ff5af8b61aa5cdb77e3cc8e44c74fea694bed504;hb=25a19dffe45b4a14ae23a4aea9b91e872f78e825;hp=94207dbdd112df56ac160b00c36285cc864418ad;hpb=e132fd56595aa2447bf5ebf53cf73b64bce32003;p=gitmo%2FMoose.git diff --git a/lib/Moose/Manual/Attributes.pod b/lib/Moose/Manual/Attributes.pod index 94207db..ff5af8b 100644 --- a/lib/Moose/Manual/Attributes.pod +++ b/lib/Moose/Manual/Attributes.pod @@ -1,8 +1,10 @@ -=pod +package Moose::Manual::Attributes; + +# ABSTRACT: Object attributes with Moose -=head1 NAME +__END__ -Moose::Manual::Attributes - Object attributes with Moose +=pod =head1 INTRODUCTION @@ -394,6 +396,15 @@ C whenever the attribute is set: This is very useful when you're building objects that may contain circular references. +When the object in a weak references goes out of scope, the attribute's value +will become C "behind the scenes". This is done by the Perl interpreter +directly, so Moose does not see this change. This means that triggers don't +fire, coercions aren't applied, etc. + +The attribute is not cleared, so a predicate method for that attribute will +still return true. Similarly, when the attribute is next accessed, a default +value will not be generated. + =head2 Triggers A C is a subroutine that is called whenever the attribute is @@ -414,7 +425,7 @@ set: } $msg .= " - size is now $size"; - warn $msg. + warn $msg; } The trigger is called I an attribute's value is set. It is @@ -612,17 +623,4 @@ Moose provides an attribute option called C. This is called when the attribute's value is being set in the constructor, and lets you change the value before it is set. -=head1 AUTHOR - -Dave Rolsky Eautarch@urth.orgE - -=head1 COPYRIGHT AND LICENSE - -Copyright 2009 by Infinity Interactive, Inc. - -L - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - =cut