I also should note that the following subroutine works: # Persists sell candidates to session storage # Should take an array of Apache::MuniCenter::MarkupMatrix::TaxSwap::Candidate Objects # Should this be redone as an object (Yes, but question is when..) sub savePreviewSellList { my $session = shift; my @items = shift; if ($debug) { warn("Request made to save sell candidates to session."); foreach my $item (@items) { # where item should be a hash reference warn($item->toString()); } }
$session->{tax_swap}->{preview_sell_candidates} = [EMAIL PROTECTED]; if ($debug) { warn("Request made to load sell candidates from session (plus any additions from browser).\n"); foreach my $item (@{$session->{tax_swap}->{preview_sell_candidates}}) { # where item should be a hash reference warn($item->toString()); } } return; } The data is properly printed out after the save; but the next call to the browser the preview_sell_candidates item just isn't there when I go to load it from the session. On Thu, 2003-10-23 at 13:47, Brendan W. McAdams wrote: > I'm trying to store an object (simple datatype, just a blessed hash > inside) within Apache::Session. I'm doing this: > $session->{tax_swap}->{preview_sell_candidates} = [EMAIL PROTECTED]; > where @items is an array of SellCandidate objects... I've stored array > references in Apache::Session before; is the problem my trying to save > the Objects, or the objects within an array Ref? > > I know from it's docs that CGI::Session can store Objects - am I better > off switching to CGI::Session if it's an Apache::Session problem, or > just quickly writing a serialize, deserialize method (which dumps to a > hash)? -- Brendan W. McAdams | [EMAIL PROTECTED] Senior Applications Developer | (646) 375-1140 TheMuniCenter, LLC | www.themunicenter.com