perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Chamas <jos...@chamas.com>
Subject Re: objects via Session
Date Wed, 10 Oct 2001 15:06:04 GMT
raptor wrote:
> 
> hi,
> 
> How u transffer objects via Session, do U freeze it first (fe. Storable) and
> then assign to Session variable OR U just assign it and Session-object do
> the dirty work....
> 

Yes, just like this:

  # STORE
  $Session->{object} = $object;

  # FETCH
  my $object = $Session->{object};

Anything that is per process related like file handles & 
database connections will not survive the freeze, just raw data 
is OK.  Also note, if it will be a lot of data potentially, you 
will need to use a StateDB other than the default of SDBM_File.  
I would suggest MLDBM::Sync::SDBM_File or DB_File.

--Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message