Except that if you want to customize the export, you don't use Exporter and write an "import" function instead. I grok it, but that's because I'm used to it -- it just struck me suddenly as kind of funny.
If designing from first principles, I'd be more inclined to have the builtin "importing" function (aka use) call a module's "export" function. That way, the function name is a command. "When I want to import, I tell it to export."
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re^2: Irony of import
by xdg
in thread Irony of import
by xdg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |