require Carp; require Test; @myexports = ( { spkg => 'Carp', ssub => 'carp', name => 'complain' }, { spkg => 'Test', ssub => 'ok', name => 'test_ok' }, ); sub import { my $callpkg = (caller)[1]; foreach $sym ( @myexports ) { no strict; *{"$callpkg\::$name"} = \&{"$spkg\::$ssub"}; } }