require Exporter; our @ISA = qw( Exporter ); our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); my %METHODS = ( foo => 'bar', bo => 'baz', ); our @EXPORT = (%keys %METHODS); BEGIN { foreach my $method (keys %METHODS) { no strict 'refs'; *$methods = sub { return $METHODS{ $method }; }; } } #### BEGIN { foreach my $method (keys %METHODS) { push @EXPORT, $method; no strict 'refs'; *$methods = sub { return $METHODS{ $method }; }; } }