-=pod
+package Moose::Manual::Attributes;
+
+# ABSTRACT: Object attributes with Moose
-=head1 NAME
+__END__
-Moose::Manual::Attributes - Object attributes with Moose
+=pod
=head1 INTRODUCTION
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<undef> "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<trigger> is a subroutine that is called whenever the attribute is
}
$msg .= " - size is now $size";
- warn $msg.
+ warn $msg;
}
The trigger is called I<after> an attribute's value is set. It is
the attribute's value is being set in the constructor, and lets you change the
value before it is set.
-=head1 AUTHOR
-
-Dave Rolsky E<lt>autarch@urth.orgE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2009 by Infinity Interactive, Inc.
-
-L<http://www.iinteractive.com>
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
=cut