Dan Muey wrote:
> I'm wanting to setup a module that will export whatever is in
> @no-spam (if anythign) and ':basic'
>
> IE I want
> use Monkey;
> To be identical to
> use Monkey qw(:basic);
>
> So if I have this on the module which of 3 ways I'm trying to
> accoomplish that are valid (if any)?
>
> %EXPORT_TAGS = {
> ':basic' => [qw(fred wilma barney dino)],
> };
> $EXPORT_TAGS{':DEFAULT'} = $EXPORT_TAGS{':basic'}; # this would do it
> right? Or
> $EXPORT_TAGS{':DEFAULT'} .= $EXPORT_TAGS{':basic'}; Or
> $EXPORT_TAGS{':DEFAULT'} = ($EXPORT_TAGS{':basic'},@no-spam
Probably this will work (haven't tried it):
$EXPORT_TAGS{':DEFAULT'} = [ @no-spam @no-spam ];
But I would do this instead:
my @no-spam = qw(fred wilma barney dino);
our @no-spam = (qw/foo bar baz/, @no-spam
our %EXPORT_TAGS = (':basic' => \@no-spam
I don't think defining :DEFAULT for yourself is what the author of Exporter
had in mind...