for my $package (@packages) { for my $function (@functions) { no strict 'refs'; *{"$package\::$function"} = get_sub($package, $function); } }