[Dbix-class] [DBIx::Class] problems after update of Loader to 03003

Matt S Trout dbix-class at trout.me.uk
Fri Jun 30 22:41:26 CEST 2006


Daniel McBrearty wrote:
> Thanks. That was it. It is clearly stated in the perldoc, silly me.
> 
> Maybe the class could emit a slightly better error message though?
> would a bug report be amiss?
> 
> But how do I now call on_connect_do?
> 
> my $mysql = My::Schema->connect( ... );
> $mysql->storage->on_connect_do(["SET NAMES 'utf8'"]);
> 
> doesn't cut it, no surprise, as I expect to tell it this before
> connecting. I tried it in loader options, and as options in the
> connect call itself, no avail ... ?

$mysql->storage->disconnect;

will disconnect the $dbh so it gets re-connected complete with on_connect_do 
on the next query.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list