[htmltmpl] H-T strangeness with CGI-Session
Brought to you by:
samtregar
From: Puneet K. <pk...@ei...> - 2004-03-26 20:24:43
|
Two apologies -- 1. goofy subject line, because I couldn't think of a concise, precise description. 2. might be considered OT, but it seems H-T is a part of this strangeness (and there seems to be no active mailing list for CGI-Session), so... I am using CGI-Session to write to a session file a record of pages visited by a user. The application is made with H-T with loop_context_vars turned on. As a page is visted, its identifying info and a descriptive text is stored in an AoH that is used to build a widget so the user may visit recently seen pages, etc. The problem is thus -- I am storing only the identifying info and a descriptive text. But the AofH in the Session file is showing additional info that looks suspiciously like the loop_context_vars. Here is an excerpt from my Session file -- "rolodex" => [{"ROLODEXVAL" => 3330,"__last__" => 0,"ROLODEXTEXT" => "Puneet Kishor (My Org, Inc.)","__counter__" => undef,"__first__" => 0,"__odd__" => 0,"__inner__" => 0}], See... I only meant to store ROLODEXVAL and ROLODEXTEXT. Where the heck did the __counter__, __first__, etc. come from? Here is the relevant code -- # Create rolodexval my $rolodexval = $res->[0]->{'contact_id'}; # Create rolodextext my $fn= $res->[0]->{'firstname'}; my $ln= $res->[0]->{'lastname'}; my $fullname = ($fn or $ln) ? "$fn $ln" : 'unnamed'; my $org = $res->[0]->{'org'}; my $rolodextext = "$fullname ($org)"; # A hash to hold the current rolodex entry my %rolodexentry = ( ROLODEXVAL => $rolodexval, ROLODEXTEXT => $rolodextext ); # Add the current rolodexentry to the existing rolodex push(@rolodex, \%rolodexentry); # Store the entire AoH in the session $session->param("rolodex", \@rolodex); |