use B 'perlstring';
use Sub::Defer ();
-our $VERSION = '0.091003'; # 0.91.3
+our $VERSION = '0.091004'; # 0.91.4
$VERSION = eval $VERSION;
require Moo::sification;
Moo->_constructor_maker_for($target)
->register_attribute_specs(%{$old->all_attribute_specs});
}
+ $Moo::HandleMoose::MOUSE{$target} = [
+ grep defined, map Mouse::Util::find_meta($_), @_
+ ] if $INC{"Mouse.pm"};
$class->_maybe_reset_handlemoose($target);
+ return;
};
_install_coderef "${target}::with" => "Moo::with" => sub {
require Moo::Role;
$class->_accessor_maker_for($target)
->generate_method($target, $name, \%spec);
$class->_maybe_reset_handlemoose($target);
+ return;
};
foreach my $type (qw(before after around)) {
_install_coderef "${target}::${type}" => "Moo::${type}" => sub {
require Class::Method::Modifiers;
_install_modifier($target, $type, @_);
+ return;
};
}
{
Extending a L<Moose> class or consuming a L<Moose::Role> should also work.
+So should extending a L<Mouse> class or consuming a L<Mouse::Role>.
+
This means that there is no need for anything like L<Any::Moose> for Moo
-code - Moo and Moose code should simply interoperate without problem.
+code - Moo and Moose code should simply interoperate without problem. To
+handle L<Mouse> code, you'll likely need an empty Moo role or class consuming
+or extending the L<Mouse> stuff since it doesn't register true L<Moose>
+metaclasses like we do.
However, these features are new as of 0.91.0 (0.091000) so while serviceable,
they are absolutely certain to not be 100% yet; please do report bugs.
C<ro> generates an accessor that dies if you attempt to write to it - i.e.
a getter only - by defaulting C<reader> to the name of the attribute.
-C<rw> generates a normal getter/setter by defauting C<accessor> to the
+C<rw> generates a normal getter/setter by defaulting C<accessor> to the
name of the attribute.
C<lazy> generates a reader like C<ro>, but also sets C<lazy> to 1 and