How can I build multiple attributes with a single builder in Moose?
Using Moose, is it possible to create a builder that builds multiple attributes at once? I have a project in which the object has several 'sets' of fields - if any member of the set is requested, I want to go ahead and populate them all. My assumption is that if I need the name, I'll also need the birthdate, and since they're in the same table, it's faster to get both in one query. I'm not sure if my question is clear enough, but hopefully some sample code will make it clear. What I have: Package WidgetPerson; use Moose; has id => (is => 'ro', isa => 'Int' ); has name => (is => 'ro', lazy => 1