Welcome to the Monastery | |
PerlMonks |
Re: Re: DBI Handlesby LanceDeeply (Chaplain) |
on Jan 21, 2003 at 03:36 UTC ( [id://228570]=note: print w/replies, xml ) | Need Help?? |
Why are you wrapping every call to the original object? the thing that DBIPool::GetHandle() returns is a DBIPool object that processes dbi handle calls. I used the AUTOLOAD function to pass all the dbi handle calls from the DBIPool wrapper object to the dbh. Why don't you ping the handle got from the pool before serving it? If you plan to run this code for long time, it is possible that stored handles won't work (morning bug or other failures). i like the idea of testing the connection before returning it, but i've only been using this module for scripts that run once and complete, not daemons. Resource Pool does have a more robust interface, but I do prefer my little class for the run once scripts I'm using.
In Section
Cool Uses for Perl
|
|