[CDBI] Odd Class::DBI error since upgrading Perl and doing a
peterspeltz at gmail.com
Fri Feb 10 18:25:40 GMT 2006
See if you are trying to do a boolean operation on an Iterator object
rather than a CDBI object. I think that is what caused this error to
pop up in my app.
#Basically, I said
$obj = Obj->search (....) ; # want one object.
# Then i did
$obj->something if $obj;
# but $obj was an iterator and not the row object i wanted. Iterator
has no bool ops
# so i wrapped in parentetheses
($obj) = Obj->search(..) # now object row object.
On 2/10/06, jmessrie at cox.net <jmessrie at cox.net> wrote:
> Yes, I am running v3.0.14. I just double-checked. In addition, I do not use might_have (which is the problem mentioned in the bug listed below). So this is occuring in other part of the CDBI code. Also, I just found out that another one of my scripts is now constantly failing with that error. Here are the only types of deletes the script performs:
> 1) Object->search(key => $value)->delete_all;
> 2) my $obj = Object->retrieve($id);
> $obj->delete if defined $obj;
> And these are all done within one transaction.
> > From: Brad Bowman <list at bereft.net>
> > Date: 2006/02/10 Fri AM 07:38:02 PST
> > To: James M <jmessrie at cox.net>
> > CC: classdbi at lists.digitalcraftsmen.net
> > Subject: Re: [CDBI] Odd Class::DBI error since upgrading Perl and doing a
> > clean install of all modules
> > On 10/02/06 03:42, James M wrote:
> > > I have been running a production application based on Class::DBI
> > > continuously with no problems. I was using Class::DBI v3.0.14.
> > >
> > > I recently decided to upgrade from Perl 5.8.7 to 5.8.8 and do a clean
> > > install of all Perl modules. Since then, one of my production scripts keeps
> > > failing with the following runtime error:
> > >
> > > Operation "bool": no method found, argument in overloaded package
> > > Class::DBI::Object::Has::Been::Deleted at
> > > /usr/lib/perl5/site_perl/5.8.8/Class/DBI.pm line 491.
> > Sounds like this bug:
> > http://rt.cpan.org/Public/Bug/Display.html?id=15635
> > which was resolved in v3.0.14, I think.
> > Are you sure that the correct CDBI version is installed?
> > Brad
> > --
> > Intelligence is nothing more than discussing things with others.
> > Limitless wisdom comes of this. -- Hagakure
> ClassDBI mailing list
> ClassDBI at lists.digitalcraftsmen.net
More information about the ClassDBI