Giannis Economou wrote:
> But now you made me really wonder what special care do objects need... > I was about to do that, it would be convenient for me to store instances > of Class::DBI into my session and re-vivifying them later on to write > them to the db. > Is there any suggested way to go for storing objects in session and have > them back solid as they were before serialization in our session? Bad idea. Class::DBI based objects are just the type that you don't want to serialize. For one, the underlying data could be changed in the DB between the time that it's frozen and then later un-thawed (this not only applies to this object's own data but also any other objects it has relationships to). Also, Class::DBI has a pretty involved constructor that will not be run when the object is thawed again which will cause havoc with the live-object-index. And there are other issues that I can't think of at this time. Instead of storing the object, just store the object's id and then re-fetch that object the next time it's used. -- Michael Peters Developer Plus Three, LP --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
