[Catalyst] Transactions with mysql - can't locate db_Main

Ross Crawford ross.crawford at gmail.com
Thu Jan 19 00:55:13 CET 2006


Thanks again. It seemed a bit weird to me too, but it did seem to work. 
However I've changed it back and added a call to connection(), and that 
seems to work too, so I'm more happy with that solution.

ROSCO

Perrin Harkins wrote:
> 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.



More information about the Catalyst mailing list