in reply to apache::dbi how to switch between development or production database?
created a new connection if an existing one was not already available -- meaning that the first time through, $dbh would contain a handle to a database, but after that, the handle could be re-used by other hits on the module.$dbh ||= DBI->connect ( ... );
My concern with your situation is that a handle to the wrong database might persist between changes from production to development. Just wanted to warn against that possibility (hopefully this comment isn't too far off base for you to use).
Of course, if you are doing a graceful or a full restart of Apache, then there won't be a problem.
"Excellent. Release the hounds." -- Monty Burns.
|
|---|