Re: [CDBI] Class::DBI and DESTROY

[prev] [thread] [next] [Date index for 2005/11/10]

From: Steven Mackenzie
Subject: Re: [CDBI] Class::DBI and DESTROY
Date: 16:48 on 10 Nov 2005
Perrin Harkins wrote:
> On Thu, 2005-11-10 at 16:12 +0000, Steven Mackenzie wrote:
> 
>>Actually, I am using the objects right after a create call. Did I miss
>>an important paragraph in the docs?
> 
> 
> No, it's a bug, which I sent a patch for in June.  I reposted part of it
> yesterday for someone having a similar problem.  See the thread "Bug
> with sequences and the object cache ( I think )" for more.

Yes I did see that and started thinking it was related, but wasn't sure.
But the docs do say fairly explicitely say that there should only be one
object per row. I'm too trusting :-)

I've coded round my problem for now by writing my own _destroy method
that cleans up my extra state. My client code will need to call it
explicitely. The correct solution would be to stop putting my furniture
in Class::DBIs living room, and aggregate the CDBI row in to another
class that holds my $writer as well. Maybe I should do that now.

>>$self->{__sssk} won't work for me if I have all these clones floating
>>about, because the key will only be in one of them.
> 
> 
> Yes, but why does that matter?  Why can't you have more than one?

I want to associate the $writer reference with the CD DB row in one
place at start up.

My client code then will have references to that row, picked up in
various ways, and I don't want to have to be careful about which object
has the $writer reference stashed in it.

Thanks again (sorry I didn't spot straight away that your post from
yesterday was my problem!)
Steven

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

(message missing)

[CDBI] Class::DBI and DESTROY
Steven Mackenzie 13:15 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Perrin Harkins 14:16 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Perrin Harkins 15:57 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Steven Mackenzie 16:12 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Perrin Harkins 16:17 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Steven Mackenzie 16:48 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Steven Mackenzie 15:57 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
William Ross 16:42 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Steven Mackenzie 17:10 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
William Ross 18:17 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Matt S Trout 18:36 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Steven Mackenzie 19:20 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Perrin Harkins 16:51 on 10 Nov 2005

Re: [CDBI] Class::DBI and DESTROY
Matt S Trout 19:43 on 10 Nov 2005

Generated at 23:12 on 13 Nov 2005 by mariachi v0.52