Using Mason components as Roles

98 views Asked by At

With the new Mason 2 introducing Moose method modifiers like around, augment, override, etc., I'd like to be able to start writing components that acted as Moose roles.

As far as I can tell, it's not supported out of the box, but has anyone tried extending Mason (through a plugin perhaps) to provide this functionality? In general, what would that entail, and is it even possible given the way Mason renders components?

edit: I've tried "faking" it using $m->visit('other component'), which seems to at least load the methods of the other component, but method modifiers seem to fail with: ...not found in the inheritance hierarchy

0

There are 0 answers