use B 'perlstring';
use Sub::Defer ();
-our $VERSION = '1.000007'; # 1.0.7
+our $VERSION = '1.000008'; # 1.0.8
$VERSION = eval $VERSION;
require Moo::sification;
isa => sub {
die "Only SWEET-TREATZ supported!" unless $_[0] eq 'SWEET-TREATZ'
},
-);
+ );
has pounds => (
is => 'rw',
C<builder> to C<_build_${attribute_name}> to allow on-demand generated
attributes. This feature was my attempt to fix my incompetence when
originally designing C<lazy_build>, and is also implemented by
-L<MooseX::AttributeShortcuts>.
+L<MooseX::AttributeShortcuts>. There is, however, nothing to stop you
+using C<lazy> and C<builder> yourself with C<rwp> or C<rw> - it's just that
+this isn't generally a good idea so we don't provide a shortcut for it.
C<rwp> generates a reader like C<ro>, but also sets C<writer> to
C<_set_${attribute_name}> for attributes that are designed to be written
un => 'one',
}
-=item * trigger
+=item * C<trigger>
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
tobyink - Toby Inkster (cpan:TOBYINK) <tobyink@cpan.org>
+haarg - Graham Knop (cpan:HAARG) <haarg@cpan.org>
+
+mattp - Matt Phillips (cpan:MATTP) <mattp@cpan.org>
+
=head1 COPYRIGHT
Copyright (c) 2010-2011 the Moo L</AUTHOR> and L</CONTRIBUTORS>