Hi all,

I want to run a production and a development version of my mod-perl web
page on the same apache server. The production and development code
lives in separate directories and all code is the same (excluding
database name). Some of the code to generate the web page and to connect
to the back end database is tied up in custom written modules that
I wrote. The module (DB.pm) that connects to my database has the
database name imbedded within, so for example if I were to view the
production web page, mod-perl will happily go away connect to the
production database. Now If I come along and view the development
version of the web page, mod-perl will realise that DB.pm is already
stored in cache and it won't reload the module. So in effect I have
connected to the production database via the development web page.

The problem I see here relates to the production and development
versions having the same name for their database connectivity modules
(DB.pm). I can code around this, but it would be very messy, and I would
like to avoid making code changes and I want my dev and prod source
codes to be the same. Is there any way of storing the module name
distinctivly with apache (other than the default of using the module
name) ? any other suggestions ?

cheers,

mark bathie.


Reply via email to