|Syntactic Confectionery Delight|
Re: Better way to define global variablesby kcott (Abbot)
|on Jul 25, 2013 at 14:36 UTC||Need Help??|
It's generally not a good idea to export by default (i.e. with @EXPORT) — see the Exporter documentation sections: Selecting What to Export and What Not to Export. Instead, consider using @EXPORT_OK and %EXPORT_TAGS.
Here's an example of Utilities.pm that does that:
Here's some sample runs showing how to use it.
No namespace pollution unless specifically requested:
Request a specific item:
Request multiple items using a tag:
Mix specific and tag requests: