[Charlotte.PM] Rose DB
Diona Kidd
diona at studio12a.com
Thu Jun 28 10:18:29 PDT 2007
I know Dan's used Rose DB. Has anyone else? I tried using it this
week at the conference but am getting an error that leads me to
believe the driver isn't being set. I thought this might make for
good conversation on our list... ;)
The tests for mysql in the Rose::DB source dir are working fine, btw.
It must be the code. You can see where I also tried setting dsn
explicitly to see if that would resolve the issue but it didn't.
Here's the error from my test:
[Wed Jun 27 15:17:15 2007] [crit] (70023)This function has not been
implemented on this platform: DBD: driver for [DBDriver unset] not
available
[Wed Jun 27 15:17:15 2007] [crit] (70023)This function has not been
implemented on this platform: DBD: failed to initialise
Here's the code.
package My::DBI;
use strict;
use Rose::DB;
our @ISA = qw(Rose::DB);
__PACKAGE__->register_db(
domain => 'development',
type => 'main',
driver => 'mysql',
database => 'test',
#dsn => 'dbi:mysql:database=test',
host => 'localhost',
username => 'user',
password => 'pass',
server_time_zone => 'UTC',
);
__PACKAGE__->default_domain('development');
__PACKAGE__->default_type('mysql');
sub connect {
my $db = __PACKAGE__->new;
my $dbh = $db->dbh or die $db->error;
return $dbh;
}
Diona
More information about the charlotte
mailing list