package myModule; require XYZ; sub import { XYZ->import("function") } 1; #### package myModule; use strict; use warnings; require Data::Dump; sub import { my $target_pkg = (caller)[0]; no strict 'refs'; for my $func ( qw/dd pp/) { *{"$target_pkg::$func"}= \&{"Data::Dump::$func"}; } } 1;