[Dbix-class] Multiple connections

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Thu Jan 16 14:20:37 GMT 2014


Peter Rabbitson wrote:
> On Thu, Jan 16, 2014 at 11:06:14AM +0000, Dave Howorth wrote:
>> I think I need to make two connections to the same MySQL database with
>> different settings of the mysql_enable_utf8 option. But calling
>> connection twice seems to result in a single connection.
> 
> connection() is not a proper way to connect to a database. See the 
> source of connect() [1] for the immediatelly obvious answer (and by 
> proxy an explanation of the problem you are experiencing).

Ah ha! Thank you, thank you.

> Please let us know what made you use connection() as opposed to 
> connect() - clearly the docs need adjusting.

Whatever it was is a long time ago and lost in the fog, sorry. I
migrated from CDBI, if that might account for it.

Cheers, Dave



More information about the DBIx-Class mailing list