![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Adding a method to an existing objectby chromatic (Archbishop) |
on Feb 13, 2012 at 02:50 UTC ( #953384=note: print w/replies, xml ) | Need Help?? |
I use a similar technique for a very simple plugin system. The main object is a Moose object, and all of the plugins are Moose roles. With in the main class (call it MyApp), I have a method:
... and within the drive program, I can write:
... and get back an object which is an instance of MyApp which performs all of the named roles. It's been working very well. Improve your skills with Modern Perl: the free book.
In Section
Seekers of Perl Wisdom
|
|