BEGIN { # because API is called first at start, to even work when mutually recursive included require Exporter; our @ISA = qw(Exporter); our @EXPORT_OK = qw(message warning error output); # symbols to export on request our %EXPORT_TAGS = (log => [qw(message warning error)], ); my %seen; # code for :all tag push @{$EXPORT_TAGS{all}}, grep {!$seen{$_}++} @{$EXPORT_TAGS{$_}} for keys %EXPORT_TAGS; }