> > I'm pondering deprecating prepare_cached() in favor of requesting a > > cached prepare() by passing the $statement as a reference > to a string. > > > > A big plus from this would be that $dbh->do(\$statement) would then > > also be defined to do a prepare_cached(). > > > > Any comments? > > The use of a string ref doesn't seem very intuitive; just an arbitrary > way of overloading a function in a way that has no intuitive > connotations to its function.
I agree. As the user has to consider what he's doing anyways, I prefer the clear, classic way of using prepare_cached (or do_cached, maybe) a lot over the silent introduction of some added complexity. A simple hash lookup should not have that utmost effect on performance. Besides, an API change should be avoided. I appreciate the idea of a default setting, though. Thanks, Jochen
