package allow_as; use Carp 'croak'; sub import { my($pkg, %args) = @_; return unless exists $args{as} and length $args{as}; croak "Symbol table '$args{as}' already exists" if defined *{"$args{as}\::"}; *{"$args{as}\::"} = *{"$pkg\::"}; } 1; =pod =head1 USAGE package Your::Very::Long::Name::Here; use base 'allow_as'; sub import { ## perhaps you want your own import code? $_[0]->SUPER::import(@_[1 .. $#_]); } ## later use Your::Very::Long::Name::Here ( as => 'yvlnh', other => [qw/user parameters perhaps?/], ); =cut