Well, here's what I have to do to get direct access to values from the original cookie hash:
my $cookies = Apache::Cookie->fetch; my %hash = defined $cookies->{'session'} ? $cookies->{'session'}->value : undef; Strange. Thanks for the lead. >-----Original Message----- >From: Perrin Harkins [mailto:[EMAIL PROTECTED] >Sent: Monday, June 02, 2003 2:41 PM >To: [EMAIL PROTECTED] >Cc: modperl >Subject: Re: Apache::Cookie > > >On Mon, 2003-06-02 at 09:05, cap wrote: >> i have an application that uses CGI and sets the cookie values >as a hashref. >> im then attempting to retreive the values with Apache::Cookie with: >> >> $cookies = Apache::Cookie->fetch; >> >> $ccokies is a hashref so i should be able to get the individual >values with: >> >> $cookies->{uid}; >> >> right? however, this doesn't appear to work. > >I see the problem. There is mistake in the Apache::Cookie >documentation, but the correct way to do this is shown in the mod_perl >guide: >http://perl.apache.org/docs/1.0/guide/porting.html#Converting_to_us >e_Apache_Perl_Modules > >Change your last line to this: > >my $uid = defined $cookies->{'uid'} ? $cookies->{'uid'}->value() : >undef; > >- Perrin >