sub readConfig { my $configfile = shift or die "No config file supplied"; # Read in the config file and set module-wide options # NB. I don't recommend "do" for this, as config files # shouldn't be able to contain executable code (IMHO) . . . } sub setConfig { my %opts = shift or die "No config options supplied"; # Set module-wide config based upon passed options . . . }