<br><br><div><span class="gmail_quote">On 8/9/06, <b class="gmail_sendername">Matt S Trout</b> &lt;<a href="mailto:dbix-class@trout.me.uk">dbix-class@trout.me.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Tim Keefer wrote:<br>&gt; unfortunately I didn't make note of the versions before I upgraded.<br>&gt;<br>&gt; We're trying to accomplish two things,<br>&gt; 1) pull database connection info out of our conf so the models can be
<br>&gt; shared between the web apps, scripts, etc.<br>&gt; 2) avoid extraneous connects to the database.<br>&gt;<br>&gt; Here's the exact code reference:<br><br>Do<br><br>sub db_Main {<br>&nbsp;&nbsp; return Class-&gt;get_schema-&gt;storage-&gt;dbh;
<br>}<br><br>instead. DBIC's $dbh handling is much, much better than what you just showed.<br>Then just have the &quot;Class&quot; class make the connection from the config and stash<br>it somewhere its get_schema method can get to.
<br><br>Nice to see Gantry users finally getting the message though; it's release as a<br>new framework using CDBI::Sweet (which I wrote the join code for before giving<br>up on CDBI and starting DBIx::Class) made me sad somewhat. Also, if there are
<br>any Gantry devs out there who'd been interested in collaboration with the<br>Catalyst project we certainly would be; it seems to be a very similar<br>framework bar the Sweet/codegen stuff and I imagine there's a lot of
<br>code-sharing that could be done.</blockquote><div><br><br>It appears that DBIC is even easier than I thought. Earlier, I found
this in the docs that made me think caching wasn't being done
DBIx::Class at the level we needed. <br>
<br>&quot;Note that DBIx::Class::Schema does not cache connections for you. If
<br>&nbsp;you use multiple connections, you need to do this manually.&quot;<br>
<br>Yes, Gantry and Bigtop originally, and still supports Class::DBI models, but we have recently realized that it doesn't play well with the other non Class::DBI applications running in our mod_perl environment . We're now in the process of adding support for DBIx::Class models which is working fine running along side everything else.
<br><br>Thanks for your help,<br>Tim<br></div><br></div><br>