);
}
};
-
+
my %methods = %{Role::Tiny->_concrete_methods_of($name)};
+ while (my ($meth_name, $meth_code) = each %methods) {
+ $meta->add_method($meth_name, $meth_code) if $meth_code;
+ }
+
# if stuff gets added afterwards, _maybe_reset_handlemoose should
# trigger the recreation of the metaclass but we need to ensure the
# Role::Tiny cache is cleared so we don't confuse Moo itself.
for my $parent (qw(MooseParent MooParent)) {
for my $child (qw(MooRoledMooClass MooRoledMooseClass)) {
- lives_and {
- my $o = $parent->new(
- e => $child->new(),
- );
- ok( $o->e->does("MooParentRole"), "$child does parent MooRole" );
- can_ok( $o->e, "role_method" );
- local $TODO = "multi-level roles are broken with moose" if $child eq "MooRoledMooseClass";
- can_ok( $o->e, "parent_role_method" );
- } "$parent instantiated with a $child delegate that does a MooRole";
+ my $o = $parent->new(
+ e => $child->new(),
+ );
+ ok( $o->e->does("MooParentRole"), "$child does parent MooRole" );
+ can_ok( $o->e, "role_method" );
+ can_ok( $o->e, "parent_role_method" );
}
}