« The Diffusion of Technical Knowledge and the Crisis of the Technology Worker | Main | Would You Find this Moose Role Useful? (Part Two) »



Feed You can follow this conversation by subscribing to the comment feed for this post.

Shlomi Fish

Just a note - without JS turned on (from all the many sources on this page), your post contains a few empty spaces where the code should be present. Why couldn't you just use a plain PRE element (or whatever) for the code? It seems to be a github gist thing in your case, but it's an overkilll for that.

John Napiorkowski

I thought I'd try the gist, since it seems all the other kids are doing that in their blogs. But if it's barrier to communication I'll do something else next time. Thanks!


this is cool


As confirmation to your idea, I've somewhat done this recently for work code. Things were config driven (though not Bread::Board, much simpler) and it cut out a lot of boiler plate code every time I wanted a class to be able to access the logger, for example.

John Napiorkowski

nperez: What I've been doing in the past is create a custom role for each class that could be 'aggregated' (not sure about the best term here), which did cut down on boilerplate line noise. Up until now that's typically what I did, just I've done maybe 20 roles like that and noticed redundancies. Would be great to see your version as I try to code up a generator. I'll try to put something on github later today for comments. Thanks for the feedback (and still looking for a name, right now it's "MooseX::Role::BuildAggregrateAttribute" although considering "MX::Role::BuildInstanceOf" as well. Not even sure this belongs in the MooseX:: namespace.


[this is good] but I confused right now

The comments to this entry are closed.