use Carp qw(croak); require Exporter; our @ISA = qw(Exporter); sub import { my ($pkg) = (caller)[0]; eval qq[ package $pkg; use strict; use warnings; use Whateverelseyouwant; ]; croak $@ if $@; # optionally, if you still need import: goto \&Exporter::import; }