[Charlotte.PM] Rose DB

Daniel Koch dksubs at mm.st
Fri Jun 29 07:17:36 PDT 2007


Before your register_db call (see 
http://search.cpan.org/~jsiracusa/Rose-DB-0.734/lib/Rose/DB.pm#registry):
__PACKAGE__->use_private_registry;

And change:
__PACKAGE__->default_type('mysql');

To:
__PACKAGE__->default_type('main');


Maybe a good topic for an upcoming meeting is to do a compare and 
contrast of some of the ORMs out there?  I'd be willing to do a 
presentation.

Dan


Diona Kidd wrote:
> 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
>
> _______________________________________________
> charlotte mailing list
> charlotte at pm.org
> http://mail.pm.org/mailman/listinfo/charlotte
>   



More information about the charlotte mailing list