Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Moose role with requirement consuming another role

by Boldra (Deacon)
on Jul 20, 2011 at 10:21 UTC ( #915627=note: print w/replies, xml ) Need Help??


in reply to Re: Moose role with requirement consuming another role
in thread Moose role with requirement consuming another role

My second example (with gazpacho), was really just meant to show that I understand the importance of the with/has order when a class consumes a role. Perhaps I over-emphasized it.

The real problem is not with class<-role(requirement), but, similar to my first example, class<-role<-role<-role(requirements). Or to go into yet more detail, I have about 30 app classes which consume one of two specialized App roles, these both consume a generic App role, which consumes three further roles, MooseX::Getopt, MooseX::SimpleConfig plus our own app-logger role.

I can easily drop the requirement in the app-logger role and everything works fine. I'm just curious if there is a better solution.



- Boldra
  • Comment on Re^2: Moose role with requirement consuming another role

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://915627]
help
Chatterbox?
[Corion]: Hi choroba! I'm somewhat fond of this picture - I think it is Breaking Bad-style even though I haven't watched the series at all ;)
[Corion]: Hmmm - and now that I look at it, the gallery I'm using doesn't produce non-Javascript compatible links in the sense that hotlinking to an image will only work for Javascript enabled...
[Corion]: On the other hand, maybe supporting non-Javascript isn't that much a priority, and I'm not exactly sure how I could make it work for both kinds of browsers without server-side magic
[Corion]: Should I ever come across far too much money, this would become my evil maniac lair ;)

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2017-02-27 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (377 votes). Check out past polls.