[Maypole] Accessing $dbh from within Maypole?

Jesse Sheidlower jester@panix.com
Tue, 2 Mar 2004 09:56:58 -0500


On Mon, Mar 01, 2004 at 09:52:41PM -0800, Dave Ranney wrote:
> Jesse,
> 
> Here's one way to find it:
> 
> $dbh = FooDB->config->{classes}->[0]->db_Main();
> 
> Obviously, after you've called setup, any of your table-based model 
> classes will have access to that method (but *not* your model base 
> class). So you could simplify that to just FooDB::Tablename->db_Main(). 

Yup, this works perfectly. Thanks!

I've posted this to the wiki, too.

Jesse Sheidlower