go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Inheriting from Exporter means that your module gains a function which is defined in the Exporter package, the "import" function. This means that anyone "using" your package will call Exporters import, to import your exported functions.
You don't need to "use" Exporter, since you do not need any functions from Exporter in your modules namespace. No, no symbols in your package are automatically exported, you need to tell it exactly which ones you want to export, using the @EXPORT_OK variable. In short, when someone "uses" your package, which is in turn inheriting from Exporter, the import function is called, which looks at your @EXPORT_OK variable, to decide which symbols to import into the calling codes namespace. HTH, C. In reply to Re: Module Loading via Exporter doubt.
by castaway
|
|