Subject: | with keyword does not support multiple roles |
differently from the pod documentation, the 'with' keyword only allows a single role to add.
Having multiple 'with' statements would be a workaround.
This patch makes with behave as documented:
<snip>
diff --git a/lib/Moo.pm b/lib/Moo.pm
index 76ed286..1b78e20 100644
--- a/lib/Moo.pm
+++ b/lib/Moo.pm
@@ -42,7 +42,7 @@ sub import {
};
_install_tracked $target => with => sub {
require Moo::Role;
- Moo::Role->apply_roles_to_package($target, @_);
+ Moo::Role->apply_roles_to_package($target, $_) for @_;
$class->_maybe_reset_handlemoose($target);
};
_install_tracked $target => has => sub {
<snap>