Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: moose role that uses a class that does the role

by tospo (Hermit)
on Jun 28, 2012 at 15:15 UTC ( [id://978954]=note: print w/replies, xml ) Need Help??


in reply to Re^2: moose role that uses a class that does the role
in thread moose role that uses a class that does the role

I guess this sort of recursion won't work as a role. A role can not depend on one of the classes it is consumed by, it should be independent and only define functionality that can be consumed by various classes. Cleary, this separation is not possible here.

So, why a role at all? Are there really other classes that are very different from Group that can also cluster? If they are similar to the Group class then I think this would better be designed using inheritance, where Group implements the "cluster" method and then you may have sub-classes of Group (or come up with a new parent that Group is a child of too) which modify the behaviour of Group.

  • Comment on Re^3: moose role that uses a class that does the role

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://978954]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-25 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found