[CDBI] Re: Class::DBI::Sweet Errors

[prev] [thread] [next] [Date index for 2006/01/10]

From: Edward J. Sabol
Subject: [CDBI] Re: Class::DBI::Sweet Errors
Date: 00:12 on 10 Jan 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?

Two possibilities.

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
   the reader.)

2. *Don't* upgrade your Class::DBI and instead put the following in your CDBI
   base class:

   *insert = \&create;

Hope this helps,
Ed

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] Class::DBI::Sweet Errors
Dave Mabe 00:00 on 10 Jan 2006

Re: [CDBI] Class::DBI::Sweet Errors
Brad Bowman 00:11 on 10 Jan 2006

[CDBI] Re: Class::DBI::Sweet Errors
Edward J. Sabol 00:12 on 10 Jan 2006

Re: [CDBI] Class::DBI::Sweet Errors
Matt S Trout 00:29 on 10 Jan 2006

Re: [CDBI] Class::DBI::Sweet Errors
Dave Mabe 00:49 on 10 Jan 2006

Re: [CDBI] Class::DBI::Sweet Errors
David Steinbrunner 12:13 on 10 Jan 2006

Re: [CDBI] Class::DBI::Sweet Errors
Dave Mabe 13:40 on 10 Jan 2006

Generated at 09:31 on 23 Jan 2006 by mariachi v0.52