[Dbix-class] Multiple connections

Peter Rabbitson rabbit+dbic at rabbit.us
Thu Jan 16 13:25:58 GMT 2014


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).

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

Cheers

[1] https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.08250/lib/DBIx/Class/Schema.pm#L526




More information about the DBIx-Class mailing list