hello hello. A couple of quick and probably silly questions, if I may, about this:
no strict ('refs'); *{"$class\::_factory"} = sub { return __PACKAGE__->instance; };
1. will __PACKAGE__ do the right thing in subclasses that inherit this code? (That is, subclasses of the package containing this snippet, not of $class).
2. does use of __PACKAGE__ here create a closure? I'm hoping that it's disappeared at compile time rather than being interpolated later...
thank you.
In reply to __PACKAGE__ in anonysub by thpfft
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |