Re: Storing blessed objects via Apache::Session

2002-05-21 Thread Chris Winters

On Tue, 2002-05-21 at 19:19, [EMAIL PROTECTED] wrote:
> Chris Winters writes:
> > Nothing special should be required -- I've done this with no problem
> > using recent versions -- 1.50+ -- of Apache::Session. The only way it
> > might be a problem is if you're trying to save a "special" resource in
> > the session -- database handle, socket connection, etc.
> > 
> > Are you sure basic sessions are working ok?
> 
> Yes, the basic functions work, but I do have a DBH inside the object.  

That might be it. To test just do something like:

 $session{foo} = bless( { hey => 'there' }, 'My::Class' );

save it, fetch it and see what happens when you do a 'ref
$session{foo}'.

You might want to either rethink having the database handle in the
object -- retrieving it from a common central location, for instance --
or create a simple function to copy the object without database handle
and set it into the session.

Chris

-- 
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.




Re: Storing blessed objects via Apache::Session

2002-05-21 Thread Chris Winters

On Tue, 2002-05-21 at 16:16, [EMAIL PROTECTED] wrote:
> I was attempting to store a blessed object via Apache::Session, but
> when the session is returned, the hash is empty.  I did some google
> searching and ran across a similar question:
> 
> http://www.geocrawler.com/archives/3/182/2000/5/0/3823715/
> 
> I have not found any other information, and was curious if there was
> something special that had to be done for this to work?
> 
> Any and all help would be most appreciated!
> 
> I have the latest Apache::Session-1.54.

Nothing special should be required -- I've done this with no problem
using recent versions -- 1.50+ -- of Apache::Session. The only way it
might be a problem is if you're trying to save a "special" resource in
the session -- database handle, socket connection, etc.

Are you sure basic sessions are working ok?

Chris

-- 
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.