# script.pl
# do stuff 1 here
####
# script.pl
use Module::That::Does::What::I::Want qw/doit/;
doit(@ARGV);
# file Module/That/does/What/I/Want.pm
package Module::That::Does::What::I::Want;
sub doit {
# do stuff 1 here
}
####
doit(@ARGV) unless caller;