[CDBI] DBI's last_insert_id and Class::DBI's _auto_increment_value

Kingsley Kerce kingsley at kingsleysoftware.com
Tue Nov 22 16:19:26 GMT 2005


David Steinbrunner writes:
 > Kingsley Kerce wrote:
 > > What's the significant difference between having an application in
 > > which you can edit a config file and change "Pg" to "mysql", and an
 > > application in which you can edit a single Perl file and change "Pg"
 > > to "mysql"?
 > 
 > For me it is a matter of abstraction.  If something about a systems can
 > modified it should be done in config and not in code because it can denote
 > that a giving change to the system is supported.  It also simplifies
 > documentation and reduces the possibility mistypes or forgotten changes to
 > code.  Another reason maybe that config files are revision controlled
 > differently than code because the have different natures.

All noble reasons.

I second Brad's recommendation for Class::DBI::Loader, which is the
next step up in abstraction above Class::DBI::{Pg,mysql,...}.
I use CDBIL in all of my projects, but I'm not yet comfortable in
letting it auto-determine relationships.

Kings





More information about the ClassDBI mailing list