Um, tilly, in the sample usage:
use MyModule { foo => 1, bar => 'two' };
are you suggesting that having Exporter.pm know about not just "foo" and "bar" but also "1" and "two" and all other possible parameter values and then having it either export them or report them as failing one at a time is somehow useful? (And your third option seems to have little to do with what was being asked.) (:
No, Exporter.pm does not provide any way of dealing with such options. You can look at Win32::TieRegistry for an example of how to parse such options while still supporting standard exporting (and non-standard exporting). But you'll probably want to ignore most of the code in Win32::TieRegistry::import as I doubt you'll want to support the strange exporting that is supported there. You might have more luck looking at Win32::TieRegistry::SetOptions.
Update: I hate this font. () and {} are nearly identical. The stuff I was talking about deals with this:
use MyModule ( foo => 1, bar => 'two' );
kind of stuff. ):
- tye (but my friends call me "Tye")In reply to (tye)Re: Passing parameters to a module's import function
by tye
in thread Passing parameters to a module's import function
by rrwo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |