Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Moose::Meta programming and derivative classesby JayBonci (Curate) |
on Apr 30, 2017 at 21:58 UTC ( [id://1189224]=perlquestion: print w/replies, xml ) | Need Help?? |
JayBonci has asked for the wisdom of the Perl Monks concerning the following question: Hello kind monks, Over at E2 I'm working on rewriting the object model to use Moose. This is slowly trying to change the tires on the car while it's moving. I'm still trying to dig in there, but my problem is that I don't know quite the right question to ask, so I thought I'd start here. This is a simplified example Let's say I had a Moose Class like:
For instance, what I want to do is create have MyApp::Object automatically create a MyApp::Object::Collection object which will contain an array of MyApp::Objects and when I call a parameter against it, it will loop through and call each of the MyApp::Object parameters. Additionally, I want this to be subclassable, so if MyApp::ChildObject comes along, that automatically creates MyApp::ChildObject::Collection. I'm a bit lost in the documentation on Moose::Meta, and am not quite sure what to google to continue. Does anyone have any pointers? Thanks!
Back to
Seekers of Perl Wisdom
|
|