Keep It Simple, Stupid | |
PerlMonks |
Re: object method questionby Zarathustra (Beadle) |
on Oct 11, 2005 at 15:49 UTC ( [id://499203]=note: print w/replies, xml ) | Need Help?? |
Big thanks to everyone who provided suggestions, advice - and warnings! Special thanks to aufflick and jZed. jZed pointed out that it was DBI::db which I needed to override ( I had been working directly under DBI, which wasn't working ). aufflick showed quite succinctly how to achieve exactly what I was asking. In my "Foo.pm" class:
Works like a charm! Now I can hand-off $foo->get_dbh to other classes, which are then able to $dbh->dbq( "blah" ) just as they were before -- no need for me to modify a ton of scripts and modules to subclass and/or change behavior. Thanks again everyone, Beers!
In Section
Seekers of Perl Wisdom
|
|