On Tue, Jan 23, 2007 at 03:10:08PM +0000, Adrian Howard wrote: > I want all of my MySQL database connections to have mysql_enable_utf8 > set. From the docs I expected something like: > > ---- > package My::DB; > use base qw( Rose::DB ); > > __PACKAGE__->use_private_registry; > > __PACKAGE__->register_db( > domain => 'test', > type => 'main', > driver => 'mysql', > database => 'test', > host => 'localhost', > username => 'username', > password => 'password', > ); > > __PACKAGE__->default_domain( 'test' ); > __PACKAGE__->default_type( 'main' ); > > Rose::DB::MySQL->mysql_enable_utf8( 1 ); > ---- > > to work, but I get > > ---- > Can't locate object method "dbh_attribute_boolean" via package > "Rose::DB::MySQL" at /usr/local/lib/perl5/site_perl/5.8.8/Rose/DB/ > MySQL.pm line 39. > ---- > > Bug - or am I misinterpreting the docs?
The docs say that mysql_enable_utf8 is an "object method", and you're calling it as a class method. In order to enable utf8 for all connections, try this: __PACKAGE__->default_connect_options( mysql_enable_utf8 => 1 ); HTH! David > Cheers, > > Adrian [..] ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object