in reply to Re: Enumerating all attributes of a Moo object
in thread Enumerating all attributes of a Moo object
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Enumerating all attributes of a Moo object
by tobyink (Canon) on Jul 09, 2013 at 08:39 UTC | |
by McA (Priest) on Jul 09, 2013 at 08:53 UTC | |
|
Re^3: Enumerating all attributes of a Moo object
by tobyink (Canon) on Jul 09, 2013 at 08:27 UTC |