From: Graham Knop Date: Sun, 24 Feb 2013 13:57:12 +0000 (-0500) Subject: clarify that default and built values don't call trigger X-Git-Tag: v1.001000~29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc7ad7173ad5d42a460d55c3c279eb3257bc94ee;p=gitmo%2FMoo.git clarify that default and built values don't call trigger --- diff --git a/lib/Moo.pm b/lib/Moo.pm index 37d0bf8..fd9d886 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -511,11 +511,11 @@ Takes a hashref un => 'one', } -=item * trigger +=item * C Takes a coderef which will get called any time the attribute is set. This -includes the constructor. Coderef will be invoked against the object with the -new value as an argument. +includes the constructor, but not default or built values. Coderef will be +invoked against the object with the new value as an argument. If you set this to just C<1>, it generates a trigger which calls the C<_trigger_${attr_name}> method on C<$self>. This feature comes from