Hi tobyink,
thank you for your answer. The comments above and what you showed me let me think again about what I wanted to do:
I want to implement a factory class generating Moo-objects. IMHO a factory class IS tightly coupled with the objects it creates. I wanted to avoid to explicitly enumerate every attribute in the code for initialisation of the created object.
Do you think that the usage of the mentioned "introspection"-method is a good way to achieve that? Or should I use a different design?
By the way: With 'attributes' I thought of all setters related to the attributes declared via 'has', that means all names used for the initialisation hash for method 'new'. Is there a common wording for that?
Best regards
McA
In reply to Re^2: Enumerating all attributes of a Moo object
by McA
in thread Enumerating all attributes of a Moo object
by McA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |