in reply to Creating a global function
I'd prefer to address the function under its fully qualified name, my $foo = Some::Module::function(@bar); That will work from anywhere and does not clutter up other namespaces.
If you still want to do that, subclass Exporter in Some::Module and place 'function' in @EXPORT to get the function by default, or @EXPORT_OK to get it by the syntax in your example. To make it available everywhere at the same time, import it at top level, into main::.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Creating a global function
by Anonymous Monk on Sep 06, 2004 at 16:09 UTC |