in reply to An alternate way of implementing import with options
in thread Passing parameters to a module's import function

Those duplicate greps bug me a bit. How about:
for (@_) { if (ref($_) eq "HASH") { push @options, $_; } else { push @exports, $_; } }

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Back where we started
by tilly (Archbishop) on Feb 13, 2001 at 21:48 UTC
    That is morally the same as my original version. In fact before I posted I had thought about having 2 arrays, and then I thought that instead of tracking options, it probably made more sense to process in place. :-)