|Keep It Simple, Stupid
At what level of structural complexity is Moose a win-win?by dwm042 (Priest)
|on Sep 29, 2010 at 14:39 UTC
dwm042 has asked for the wisdom of the Perl Monks concerning the following question:
I'm running into Moose through Catalyst, and liking what I see of Moose. I've worked in C++ before, with the endless getters and putters, the constructors from hell. For complex classes, the savings in time and clarity gained is worth the code layer.
But how complex does it have to be to be a win? Obviously I'm fishing for judgments here based on the experience of the Monks, as I have just my exposure over the past couple weeks of Catalyst hacking. For something as simple as a stack I'm not sure it's a win over
That said, in Catalyst, a Moose based model can be preloaded with stuff, from a config file, and it isn't that much harder to do things like
My gut feeling though is, the bigger the collection of related data structures in a class, the bigger the potential win. And I'm curious how others feel about this issue.