I've used this for my own code so that forked kids get their own $dbh, for example.Dynamic Database Connections It is sometimes desirable to generate your database connection +informa- tion dynamically, for example, to allow multiple databases with + the same schema to not have to duplicate an entire class hierarchy. The preferred method for doing this is to supply your own db_Ma +in() method rather than calling set_db(). This method should return +a valid database handle. Note however that this is class data, and that changing it may +have unexpected behaviour for instances of the class already in exis +tence.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Setting up Class::DBI classes with existing $dbh
by merlyn
in thread Setting up Class::DBI classes with existing $dbh
by Arunbear
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |