Peter Beardsley wrote:
> 
> I'm trying to learn how to use the $Session object to maintain session
> state and I'm running into a few problems.  I want to use it to store a
> reference to a complex data structure(It's an arrayref of hashrefs... yes I
> read the docs on this and I'm using it read-only) like so:
> 
> $Session->{'companyrowref'} = Data::GetCompanies();
> 
> The first time I did this it worked fine-- I got my data structure back,
> assinged it to the object and got data out of it fine across requests.
> 
> Then I needed to figure out how to figure out a way to invalidate it for a
> refresh mechanism...  I figured a simple undef would do:
> 
>   undef( $Session->{'companyrowref'} );
> 

How about these?

  $Session->{'companyrowref'} = undef;
  delete $Session->{'companyrowref'};
  %$Session = ();

Do these clear the data correctly?

--Josh

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to