G'day nysus,
I don't see anything intrinsically wrong with what your doing. In fact, the BUILD section of Moose::Manual::Construction shows a similar example.
As this was intended to be a general question, I'll just point out BUILDARGS (which is in the same documentation page). In some cases, that may be a better option.
One of the main differences between the two of those is that BUILDARGS occurs before object creation, while BUILD occurs after. That's typically the main criterion I use when choosing which to use. By the way, you're not restricted to using one or the other: I've certainly used both at various times.
— Ken
In reply to Re: Is setting attributes with BUILD in Moose a bad idea?
by kcott
in thread Is setting attributes with BUILD in Moose a bad idea?
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |