Hi Matt -
Thanks for the tip! Yep, this makes sense and works well.
I'm still relying on my old code for an oo database with no driver.
I'm looking to interface more directly with DBIC if possible in the
future, but for now, things are working as expected.
Thanks,
Todd
On Jun 24, 2007, at 2:16 AM, Matt S Trout wrote:
On Sun, Jun 24, 2007 at 12:17:27AM -0600, Todd Harris wrote:
Hi all -
I'm a newb to Catalyst and am trying to retrofit some code into the
framework. In particular, I'm debating about the best place to
position some database handles. Most of these have their own APIs,
negating the need for something like CDBI or DBIx::Class; others are
for obscure oo-databases.
In the past, I've relied on persistence of globals under mod_perl to
establish DBHs to these resources in a tradtional Perl module
inheritance layout. What might be the most appropriate for these
under Catalyst? Should I look to put methods that establish DB
connections under MyApp.pm and stash the database handles in $c?
Should I subclass Catalyst::Model instead?
Catalyst::Model::DBI :)
The code in there is derived from the DBIC storage code so it's
more robust
than anything you're going to write yourself (we have more people
breaking
ours :)
--
Matt S Trout Need help with your Catalyst or
DBIx::Class project?
Technical Director Want a managed development or deployment
platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk
for a quote
http://chainsawblues.vox.com/ http://
www.shadowcatsystems.co.uk/
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/
[email protected]/
Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/