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;
if ($Moo::Role::INFO{$target} and $Moo::Role::INFO{$target}{is_role}) {
die "Cannot import Moo into a role";
}
- return if $MAKERS{$target}; # already exported into this package
- $MAKERS{$target} = { is_class => 1 };
+ $MAKERS{$target} ||= {};
_install_tracked $target => extends => sub {
$class->_set_superclasses($target, @_);
$class->_maybe_reset_handlemoose($target);
return;
};
}
+ return if $MAKERS{$target}{is_class}; # already exported into this package
+ $MAKERS{$target}{is_class} = 1;
{
no strict 'refs';
@{"${target}::ISA"} = do {
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
tobyink - Toby Inkster (cpan:TOBYINK) <tobyink@cpan.org>
+haarg - Graham Knop (cpan:HAARG) <haarg@cpan.org>
+
=head1 COPYRIGHT
Copyright (c) 2010-2011 the Moo L</AUTHOR> and L</CONTRIBUTORS>