in reply to Re: Passing an import list to Moose extends
in thread Passing an import list to Moose extends
Was thinking the same. Either use 'use' or call the import function directly.
Looking at this, why trying to call the import functions at all actually? You should always be able to inherit, Since use Foo '-myFeature' (your class is 'used') will eventually have the same effect.
Wonder what will happens with the selected option in case the user of your class will specify a different option. What if you have already 'used' the class with a certain option. Will the import list specified by the user of your class still be used or silently ignored? The 'use' clause is executed only once right? Or will the import function still be executed?
Calling the import function doesn't seem to have anything to do with extends. Just like use base/parent MyBase is not calling an import function either. Is this actually specific to Moose?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Passing an import list to Moose extends
by LanX (Saint) on May 04, 2018 at 22:45 UTC | |
by davido (Cardinal) on May 05, 2018 at 05:54 UTC | |
by LanX (Saint) on May 05, 2018 at 12:27 UTC |