[Mason] Apache::Session not storing changes to hashref
[Citation date: Tue, 22 May 2001 15:59:52 -0400] Chris == Chris Thompson [EMAIL PROTECTED] Chris I've got a hash %s successfully re tied every request. I'm Chris using it to store a session id and userid with success, so Chris I know it's storing. In the Behavior section of the Apache::Session man page, you'll find: Note that Apache::Session does only a shallow check to see if anything has changed. If nothing changes in the top level tied hash, the data will not be updated in the back- ing store. You are encouraged to timestamp the session hash so that it is sure to be updated. Basically, you'll need to either: 1. Use the 'timestamp' technique suggested above. 2. Deference your variables a bit before updates. Instead of: $s{$x}-[$y]-{$z} = 5; you'll need to use some intermediate variables: $q = $s{$x}-[$y]; $q-{$z} = 5; $s{$x} = $q; RTFM. -- [EMAIL PROTECTED] A hundred thousand lemmings can't be wrong. -- attributed to Larry Sheldon, Jr.
Re: [Mason] Apache::Session not storing changes to hashref
--sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 22, 2001 at 03:59:52PM -0400, Chris Thompson wrote: I'm at wits end, I'm hoping someone can tell me what's wrong. [snip] This is documented (Apache::Session doesn't recurse into the data structure to look for changes) somewhere ... I use this whenever changing the session to force it to always get written back to the database: tied(%session)-make_modified; Dave --=20 - Dave Baker : [EMAIL PROTECTED] : [EMAIL PROTECTED] : http://dsb3.com/ GnuPG: 1024D/D7BCA55D / 09CD D148 57DE 711E 6708 B772 0DD4 51D5 D7BC A55D --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature Content-Disposition: inline -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.5 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7CujhDdRR1de8pV0RAqs9AJ9kk7njnzmOxBxxHil5gzKcwH0btACgiOi1 +UT3Yah27RAff02JB486JD0= =SNvV -END PGP SIGNATURE- --sm4nu43k4a2Rpi4c--