Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Embperl

$udat session anomaly

 

 

ModPerl embperl RSS feed   Index | Next | Previous | View Threaded


aare at myrien

Sep 7, 2007, 2:56 AM

Post #1 of 2 (1331 views)
Permalink
$udat session anomaly

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?

Thanks in advance,
Aare






---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl


wolfgang at kinkeldei

Sep 7, 2007, 4:37 AM

Post #2 of 2 (1199 views)
Permalink
Re: $udat session anomaly [In reply to]

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 -->
Attachments: smime.p7s (2.37 KB)

ModPerl embperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.