Perl-Sensitive Sunglasses | |
PerlMonks |
Re^4: __PACKAGE__ in anonysubby thpfft (Chaplain) |
on Feb 19, 2005 at 21:05 UTC ( [id://432780]=note: print w/replies, xml ) | Need Help?? |
I'm sorry: I think I was very unclear in the original question, and simplified away the wrong bits. It's the package name of the factory that I want to capture in a method injected into the Drone class, so that the Drone (no idea why I called it that) can call instance() on the right factory class. The answer turns out to be very simple, and much the same as your neat constructions:
but it does look like I can't do it without creating some kind of closure, which I was hoping to avoid... Thanks for your help.
In Section
Seekers of Perl Wisdom
|
|