sub import { my $self = shift; my @out; foreach (@_) { if (ref($_)) { # Do one thing } else { push @out, $_; } } @_ = ($self, @out); goto &Exporter::import; }
UPDATE
Two quick notes. First of all I had put the case of
Exporter wrong. Oops. Secondly the point here is that
you can preprocess the list of arguments being imported
in any way you please before Exporter sees them. (eg Take
references out of the list and do something useful with
them.)
In reply to Re (tilly) 1: Passing parameters to a module's import function
by tilly
in thread Passing parameters to a module's import function
by rrwo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |