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/ +
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/