Hi Mark -- > Another question: Do you store Site::Configuration in the "perllib" > directory with the other perl modules? I found this made site > launches a > little more difficult, because I would want to copy > "everything but the > Config module" to the live site, which have an existing Config module > configured for the live site. Instead, I store a config file in a > "config" directory. > > Perhaps you solve this with the "if $ENV{DEVMODE}" construct you > illustrated above.
I definitely store "Site::Configuration" along with all the other modules. As you've identified, I use a mechanism similar to my "if $ENV{DEVMODE}" example to automatically change the run-time configuration. The system I use is based on a few ideas: 1. There are things called "environments", of which "production", "staging", and "Mark's development" would be a few. 2. Each environment should have its own Apache server. 3. Environments need to be centrally managed. 4. The process for moving work between environments must be totally consistent for Quality Assurance's sake. 5. Each environment is defined by a number of distinct run-time settings. Regarding number five, here is a list of run-time properties for environments in my typical system: ENVIRONMENT_NAME DEV_ROOT LOG_DIR SITE_HOST_NAME APACHE_IP APACHE_ROOT APACHE_PIDFILE For each environment I have a hash containing values for these parameters. A control script (run via sudo) is used to start and stop Apache. This control script reads the environment name (e.g., "production", "mark", "jesse", etc.) from a UNIX environment variable, and selects the proper hash of environment configuration settings. This control script then *dynamically* creates an Apache "httpd.conf" from a template (using HTML::Template, of course) populating things like the IP address and host name. (N.b., the "DEV_ROOT" property is used to automatically set PERL5LIB and HTML_TEMPLATE_ROOT.) As you can imagine, this system eliminates the problems usually related to moving changes between environments. I've been using this system for years. TTYL, -Jesse- -- Jesse Erlbaum The Erlbaum Group [EMAIL PROTECTED] Phone: 212-684-6161 Fax: 212-684-6226 --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]