[Catalyst] Transactions with mysql - can't locate db_Main
Perrin Harkins
perrin at elem.com
Thu Jan 19 00:03:03 CET 2006
On Thu, 2006-01-19 at 09:55 +1100, Ross Crawford wrote:
> I fiddled around a bit, and it appears changing:
>
> my $dbh = $class->db_Main;
>
> to:
>
> my $dbh = $class::db_Main;
>
> seems to work. I will continue testing to confirm this.
I don't think you want to do that. It shouldn't work.
If you want your base class to work for this, the simplest thing is
probably to call connection() (or set_db in older versions) in your base
class, as shown in the Class::DBI docs. It inherits from Class::DBI, so
that should work.
- Perrin
More information about the Catalyst
mailing list