I want to exemplify the weakness of DBIx::Connect. Let's say that you have a dev and production database:
[basic] user= postgres pass = <STDIN> dsn= dbi:Pg:dbname=mydb attr RaiseError = 0 attr PrintError = 0 attr Taint = 1 [dev_db] user = root pass = w00t! dsn = dbi:mysql:database=mysqldb;host=localhost attr RaiseError = 1 attr PrintError = 1
Once you are setup like that you can simply connect to the database you want via DBIx::Connect->to('dev_db');
But now imagine that you come back from a refreshing 2-week vacation in the Bahamas and dev_db now has 7 databases that you must process. With the current use of AppConfig as the underlying config module, there does not appear to be an easy way to create user and passdefaults for all databases at a certain host. So, you have to copy and paste the same user and password information for 7 new entries and anyone that has been programming is very leery of cutting and pasting anything --- there should always be some programmatic means of reuse, be it a subroutine or inheritance of a default or whatever.
When dragonchild says that he has lots and lots of machines to deal with, such defaulting and inheritance is important and it is why I must use Resources for any future version of database conection package that I develop. The author of this package is AWOL and I have upgraded it to pass the test suite on new versions of Perl and eliminated all warnings... I want to add in some DBI connection support and rename it Config::Resources so that more people looking for a config package can find it.
Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I swim in a sea of databases and DBIx::Connect is barely adequate
by perrin (Chancellor) on Oct 16, 2003 at 15:22 UTC | |
by princepawn (Parson) on Oct 20, 2003 at 23:49 UTC | |
by perrin (Chancellor) on Oct 21, 2003 at 00:40 UTC | |
by princepawn (Parson) on Oct 21, 2003 at 00:53 UTC | |
|
Re: I swim in a sea of databases and DBIx::Connect is barely adequate
by Abigail-II (Bishop) on Oct 16, 2003 at 14:54 UTC | |
|
Re: I swim in a sea of databases and DBIx::Connect is barely adequate
by dragonchild (Archbishop) on Oct 16, 2003 at 14:51 UTC | |
by princepawn (Parson) on Oct 17, 2003 at 04:13 UTC |