[CDBI] pass in database name from application

Steven Mackenzie steven.mackenzie at aptile.co.uk
Mon Oct 10 10:09:43 BST 2005


I think Class::DBI::Factory is the solution to that problem. I'm looking
at using it soon, but haven't yet ...

http://search.cpan.org/~wross/Class-DBI-Factory-0.994/lib/Class/DBI/Factory.pm



Thomas Kwan (eTechfocus) wrote:
> Hello there,
>  
> Is there anyone knows how to make a Class::DBI object
> reuseable with multiple databases within the same
> process?
>  
> For example, I want to build a User class that extends
> Class::DBI. Then, I want to read a User object from
> database A and a User object from database B, using
> the same User class ideally. Then, I want to compare
> them.
>  
> How can I build reuseable DBI object API without hardcoding
> the database name, user id, password, table name in
> the class?
>  
> thanks
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ClassDBI mailing list
> ClassDBI at lists.digitalcraftsmen.net
> http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi




More information about the ClassDBI mailing list