On Wednesday 27 March 2002 03:08, Oleg Assovski wrote: > >> >> my $res = tieHash( undef, \%flex_options, \%session); > >> > >> IMHO key is here ^^^^^^^ > >> Apache::Session and its derivatives saves changes in session hash to > >> storage only when hash is untied. If not - changes are lost. > > > >Anyway, you can't store refs to the session hash in globals, it breaks the > >whole system. This also goes for code in taglibs etc. If you keep a ref to > >the session hash, you WILL break the session management system! This is > > going > > Nope ! You can have global session object and references to it as we do > here at www.satmania.com. But you have to explicitly untie it every time > you have finished with it. If you forget to untie it, you will get very > funny effects when another request obtain your old session data through > tied global object.
Yeah, well, sure, you could do that too. The point is you cannot just use the session object like any old reference, you have to make sure it gets cleaned up at the end of every request. Apache takes care of destroying the request object, so the reference in pnotes isn't a problem. It doesn't seem to me that a global session object is much good Oleg if you have to untie it anyway... Besides, if you could rely entirely on global variables you wouldn't NEED Apache::Session! > > > Ciao, OLeG > ----------------------------------------------------------------- > Oleg Assovski, Development dept., Bitcom Ltd., Moscow > We make few little bugs, > we compensate with a lot of big ones > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
