in reply to Re (tilly) 1: Passing parameters to a module's import function
in thread Passing parameters to a module's import function
I've already been experimenting with something like the import function you've shown. But by "no such facility exists in Exporter" I mean that you can't have the following in your module:
package MyModule; use Exporter; @ISA = qw( Exporter ); @EXPORT_OK = qw( mysub anothersub ); @ATTRIBUTES = qw( foo bar );
so that in your module you could use:
use MyModule qw( anothersub ), { foo => 1 };
It would be a good feature for Exporter. (Ideally one would specify required attributes and maybe specify types, default values, etc.).
UPDATE: Ok, I've corrected the formatting. Didn't realize CODE was converted to PRE.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 3: Passing parameters to a module's import function
by tilly (Archbishop) on Feb 13, 2001 at 08:08 UTC | |
by rrwo (Friar) on Feb 13, 2001 at 20:50 UTC |