Okay. Thought it might have been a typo :-)
So, your tests show that in the development environment, $dsn expands to DBI:mysql:database=foo;port=3308 (which is what you seem to want), yet the wrong database is being updated. If that is correct, I don't know what's wrong; the perl up to here is fine.
Sorry.
Comment on Re: Re: Re: Centralized DSN Switch Script (MySQL)
At least I'm not alone then in my bogglement. ;) I was thinking that maybe it has something to do in the DBD/DBI layer. Oh man, I'm gonna lose some more hair over this one...