[CDBI] Re: ANNOUNCE: Ima::DBI 0.35 released

Michael G Schwern schwern at pobox.com
Mon Jun 11 18:33:14 BST 2007


Edward J. Sabol wrote:
> Basically, that line of Ima::DBI's set_sql() method would become something
> like the following:
> 
> 	$cache = (defined($class->_default_cache_setting)
> 		  ? $class->_default_cache_setting : 1) unless defined $cache;
> 
> And earlier in the module there would be
> 
> Ima::DBI->mk_classdata('_default_cache_setting');
> 
> (I'm not advocating that it should necesarily be named
> '_default_cache_setting'; that's just what I came up with off the top of
> my head.)
> 
> What do you think? If someone were to submit a bug for Ima::DBI with a patch
> like that (along with docs and tests)...

That's exactly what I was thinking.  "prepare_cached_if_active()" seems nicely
descriptive.

Additionally I would recommend just changing the Ima::DBI default to 3.  I've
already hacked my copy to do just that.  The only folks who will be effected
are those who ignore the current warning, the safer default is worth breaking
quirky code that ignores warnings.  If they really want to preserve the old
behavior they can set prepare_cached_if_active(0).



More information about the ClassDBI mailing list