in reply to Centralized DSN Switch Script (MySQL)
I was originally going to suggest making the file into a module proper and writing your own import subroutine. Doing that would allow you to say:
On second thought, that doesn't seem too helpful. If you want to be able to move a development script to a production server without having to edit anything, it won't work. It's a little more robust, though, for values of robust that include packages and avoiding global variables.use JDB::DSN 'dev'; my $dbh = connect();
|
|---|