[CDBI] Re: Class::DBI::Sweet Errors
Edward J. Sabol
sabol at alderaan.gsfc.nasa.gov
Tue Jan 10 00:12:11 GMT 2006
Dave Mabe wrote:
> Can't locate object method "insert" via package "Class::DBI::Sweet" at
> /usr/lib/perl5/site_perl/5.8.2/Class/DBI/Sweet.pm line 630.
> It works fine under Class::DBI. Any ideas?
1. Upgrade your Class::DBI. In some recent version v3.0.something, the
create() method was renamed insert(). create() still works for the time
being, but it's deprecated.
(Determining why find_or_create() wasn't renamed to be find_or_insert()
and the *_create triggers weren't renamed to *_insert is an excercise for
2. *Don't* upgrade your Class::DBI and instead put the following in your CDBI
*insert = \&create;
Hope this helps,
More information about the ClassDBI