in reply to Re: Moo[se] namespace weirdness with conditionally composed-in Roles (two roles with the same name, with alias)
in thread SOLVED [ create_class_with_roles() ]: Moo[se] namespace weirdness with conditionally composed-in Roles

Naturally adding  with 'Odd', 'Even'; yields  Due to a method name conflict between roles 'Even and Odd', the method 'bar' must be implemented by 'MyClass' :)
  • Comment on Re^2: Moo[se] namespace weirdness with conditionally composed-in Roles (two roles with the same name, with alias)
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: Moo[se] namespace weirdness with conditionally composed-in Roles (two roles with the same name, with alias)
by 1nickt (Canon) on Mar 21, 2016 at 08:23 UTC

    Right. I'm not trying to load more than one Role with a method of the same name, though. I want to load one or the other and have the parent execute the loaded module's methods when called. Looks like I can get what I want with apply_roles_to_object() so long as I am willing to accept the Roles overwriting the parent's methods in case of conflict (which is the opposite of a Role as far as I know, but I can live with it).

    Thanks for your reply.


    The way forward always starts with a minimal test.