Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Setting up Class::DBI classes with existing $dbh

by hanenkamp (Pilgrim)
on Dec 09, 2003 at 21:46 UTC ( [id://313558]=note: print w/replies, xml ) Need Help??


in reply to Setting up Class::DBI classes with existing $dbh

You might want to look through the Class::DBI and Ima::DBI documentation, specifically the section called "Dynamic Database Connections" in Class::DBI. You can define your own db_Main() method that returns your DBI connection rather than using set_db() directly. I've never done this, but this should work without a hitch. That is,

package MyClass; use base 'Class::DBI'; # Stuff.... sub connect { # .... } sub db_Main() { return connect; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://313558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-23 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found