As samtregar suggested, a better way to do this from an OO purity standpoint is with composition, not inheritance.
However, this has little to do with Exporter as such; import() is merely the mechanism that runs optional code whenever you use a module. Conceptually, I agree with perrin that there's a semantic problem with pushing additional code here, but practically it's almost the only hook there is for such things and it's so useful that I use it often.
In reply to Re: Abusing Exporter for Conditional Inheritance
by chromatic
in thread Abusing Exporter for Conditional Inheritance
by mojotoad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |