perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adi <>
Subject Re: Small Apache::Session improvement
Date Sat, 25 Mar 2000 17:28:15 GMT
"Jeffrey W. Baker" wrote:
> Actually the behavior is backward-compatible with existing Apache::Session
> code.  My code already ignores changes that do not occur in the top level
> hash.  This was both easy to right (sloth is a virtue), and fast at
> runtime.  The module could be rewritten to do a "deep" data structure
> comparison, but that would be both hard and slow.
> -jwb

I agree it should not do a deep comparison.  That should be done outside
Apache::Session if need be.  My concern was whether you could make changes
to the top-level hash and still get the same memory location for the new

say your session data was:

	$sesshash->{'foo'} => { 'bar' => 'baz' }

	at location: HASH(0x80c8554)

you do a:

	$sesshash->{'foo'} = { 'bar' => 'baz', 'a' => 'b' };

can this new hash be allocated at the same memory location HASH(0x80c8554) ?

If this can happen, it would lose data.  Though I would guess it cannot
occur, since perl's anonymous hash syntax {} creates a brand new hash, in
unused memory, right?

So I guess it's not much of a concern.  Pardon the rambling..


View raw message