On Feb 8, 2007, at 7:24 PM, Michael Reece wrote:
> trying every which way to make Rose::DB::Object(s) always use my
> custom global $dbh,
>
i have no idea why your package isn't working (i have a few ideas,
but no time to test)
i suggest trying this approach, which is essentially what i do:
package Vinq::RDB::Object;
use Vinq:: Globals ();
use Vinq::RDB::MySQL ();
use Rose::DB::Object ();
use base qw(Rose::DB::Object);
sub init_db {
my $db= Vinq::RDB::MySQL->new();
$db->dbh( $Vinq::Globals::dbh );
return $db;
};
Then have objects inherit from Vinq::RDB::Object instead of
Rose::DB::Object.
My system is different, I keep a 'bad' dbh by default and stuff a
valid dbh manually after i get a read/write/config dbh from a factory
class.
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
-------------------------------------------------------------------------
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