
wolfgang at kinkeldei
Sep 7, 2007, 4:37 AM
Post #2 of 2
(1199 views)
Permalink
|
Am 07.09.2007 um 11:56 schrieb Aare Vesi: > Hello, > > I have the following problem with adding information into $udat > sessions. Used to work alright but now in some parts it works and > in some parts it does not. > > For example adding information as hash: > $udat{sessioninfo} -> {subinfo} = 'test'; > > and in another test page representing it as [+ Data::Dumper::Dumper > $udat{sessioninfo} +] works perfectly. > > But in the main code sometimes it does not work: $udat{sessioninfo} > -> {subinfo} value is undef/empty and nothing else in the code is > assigning values to that hash. > > Is there a way to debug session ($udat) information assignments? I fear the problem is located somewhere else. $udat is represented by a tied hash. This means that only write operations to the top level of this hash really do mark this hash as dirty triggering a writeback to your session storage. To circumvent this problem, you might do this: <snip> $udat{sessioninfo}->{subinfo} = 'test'; $udat{_dirtyflag} = 1; # triggers a write back delete $udat{_dirtyflag}; # just remove this unneccesary key again <snap> Regards, Wolfgang -- ' /\_/\ ' .print[split??,"".(($/=q|Cms)+-03467:;<=|)=~tr!C-z -B! -z!)x '( o.o )' .$/]->[hex]foreach split qr<>,qq+1ecd039ad65b025b8063475b+|| ' > ^ < ' .q<!-- Wolfgang Kinkeldei - mailto:wolfgang [at] kinkeldei -->
|