in reply to Class::DBI connect info from file?

The Class::DBI documentation covers this. You setup a method called db_Main() which will return a valid DBI handle. All subclasses that don't otherwise override db_Main will use that handle.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Class::DBI connect info from file?
by perrin (Chancellor) on Jan 21, 2004 at 21:51 UTC
    FYI, db_Main doesn't work all that well at the moment. The reason is that unless you pass it an Ima::DBI handle (not vanilla DBI) it will have problems with transactions and with automatic setup classes like Class::DBI::mysql. I think Tony posted a code snippet to the mailing list showing how to open an Ima::DBI handle yourself and pass it through to Class::DBI, which is what you should do if you can't use the set_db method.