On 1/2/07, Pedro Melo <[EMAIL PROTECTED]> wrote:
Hi,
On Jan 3, 2007, at 2:22 AM, Ivan Wills wrote:
> I am using DBIx::Class in a new Catalyst project which will include
> some
> legacy code that uses plain DBI. Is there a way to get the database
> handle from my schema and pass it on to the legacy code? I could
> not see
> how to do this from the docs.
$schema->storage->dbh
See perldoc DBIx::Class::Storage::DBI
But don't store this anywhere long-term or you'll shoot yourself in
the foot. Retrieve it freshly when you need it, use it immediately,
and let it fall out of scope.
-- Brandon
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/