An aside. Here's another way of coding it:
sub import { my $self = shift; my @exports = grep { "HASH" ne ref($_) } @_; my @options = grep { "HASH" eq ref($_) } @_; foreach (@options) { # handle options here } @_ = ($self, @exports); goto &Exporter::import; }
Question: will grep interfere with @_ (making the above a bit dangerous)?
In reply to An alternate way of implementing import with options
by rrwo
in thread Passing parameters to a module's import function
by rrwo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |