in reply to I swim in a sea of databases and DBIx::Connect is barely adequate

Here's another question - I have a bunch of databases, but I also have the situation where, depending on what I'm doing, I need to connect to DB foo as bar one time, but baz another. I wasn't able to find in DBIx::Connect's docs how that would happen, programatically. (Nearly every Perl action at the place I'm at happens in batch mode ...)

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

  • Comment on Re: I swim in a sea of databases and DBIx::Connect is barely adequate

Replies are listed 'Best First'.
Re: Re: I swim in a sea of databases and DBIx::Connect is barely adequate
by princepawn (Parson) on Oct 17, 2003 at 04:13 UTC
    I have a bunch of databases, but I also have the situation where, depending on what I'm doing, I need to connect to DB foo as bar one time, but baz another. I wasn't able to find in DBIx::Connect's docs how that would happen, programatically.
    You're right, programmatically is out the window. You would have to have a label for each case, e.g:
    [hohoho_as_foo] dsn=dbi:mysql:dbname=hohoho user=foo pass=foozle [hohoho_as_bar dsn=dbi:mysql:dbname=hohoho user=bar pass=baz
    Of course, again, with Resources, you would be able to default and inherit as one jolly well pleases, which is why I have my eyes set on it for a rewrite/forking of DBIx::Connect

    Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality.