I usually use a configuration object with a configuration file and provide the path to that configuration file in an $ENV var. Other modules which use that data (database connections, logging levels, etc) pull those values from the configuration object. Then however the project is invoked (ie, mod_perl from startup.pl, or scripts, or whatever) it just sets that $ENV var.