Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
"An import list", you say? Who would ever need to pass an import list to an object oriented module? ...except that import lists are sometimes used for other purposes. An example would be use strict 'vars';, where 'vars' is passed to ->import() so that the import routine can alter a specific behavior (not actually import something). Consider a Moose-based class inheriting from a non-Moose base class. This happens, and often can work out fine. But what if that non-Moose base class needs an import list to configure some feature?
extends accepts multiple parent classes, so extends 'MyBase', -myfeature; would blow up. Is there a solution that doesn't involve this?
Dave In reply to Passing an import list to Moose extends by davido
|
|