Dan Horne wrote:
Yes - I often need user, pass and dsn strings for a DBI connection or a DBI::db object. What would be the best pattern to deal with such cases if one were to generalise it?
If you want to generalize the connection info for a database, the best way to do it is just use a single Perl hash for all of it, where there is one hash element per each detail used to describe a connection. There are no kinds of details that are common to all database connections, so it is best to make this completely open, where the set of valid details is determined by what database you are connecting to and what DBMS facilitates that access. -- Darren Duncan