I ran a test script containing your code:
---
package Spot::DB;
use strict;
use warnings;
use Rose::DB;
our @ISA = qw(Rose::DB);
Spot::DB->register_db(
domain => 'development',
type => 'main',
driver => 'Pg',
database => 'test',
username => 'postgres',
host => 'localhost',
);
__PACKAGE__->default_connect_options({AutoCommit=>1,
RaiseError=>1,
PrintError=>1,
Warn =>1,}
);
__PACKAGE__->default_domain('development');
__PACKAGE__->default_type('main');
package main;
my $db = Spot::DB->new;
print "AutoCommit is ", $db->dbh->{'AutoCommit'}, "\n";
use Data::Dumper;
print Dumper($db);
---
The output looks like this (spacing adjusted):
---
AutoCommit is 1
$VAR1 = bless({
'database_version' => undef,
'connect_options_for' => {
'development' => { 'main' => 1 }
},
'_dbh_refcount' => 1,
'host' => 'localhost',
'username' => 'postgres',
'database' => 'test',
'_origin_class' => 'Spot::DB',
'domain' => 'development',
'connect_options' => {
'Warn' => 1,
'AutoCommit' => 1,
'RaiseError' => 1,
'PrintError' => 1
},
'dsn' => 'dbi:Pg:dbname=test;host=localhost',
'dbh' => bless( {}, 'DBI::db' ),
'error' => undef,
'id' => 'developmentmain',
'type' => 'main',
'driver' => 'pg'
}, 'Spot::DB::__RoseDBPrivate__::Rose::DB::Pg' );
---
I'm not sure what's different about this code and the code that leads
to the object you dumped in your earlier email.
-John
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object