trying every which way to make Rose::DB::Object(s) always use my
custom global $dbh,
package Vinq::RDB::MySQL;
use base 'Rose::DB';
use Vinq::Globals qw( $dbh );
__PACKAGE__->use_private_registry;
__PACKAGE__->register_db(driver => 'mysql');
sub dbh { $dbh }
sub driver { 'mysql' }
1;
things were working great until i tried to
$junk->add_stuff({ name => 'stuff 1' });
$junk->save;
which leads to a '$db->commit or die $db->error;', but commit() says
(in Rose/DB.pm):
sub commit
{
my($self) = shift;
return 0 unless(defined $self->{'dbh'} && $self->{'dbh'}
{'Active'});
my $dbh = $self->dbh or return undef;
...
but while $self->dbh returns my $dbh, $self->{'dbh'} hasn't been set
so it dies (with no error).
are there any docs/tutorials/testimonials about successfully using
your own $dbh?
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object