from the looks of the code you guys posted, I would guess that
Cookie->fetch returns a hash reference, not a hash. Could this be the
problem?
Thomas S. Brettin
Staff Member
Bioscience Division, MS-M888
Los Alamos National Laboratory
Los Alamos, NM 87545
505-665-3334
On Fri, 15 Sep 2000, Chris Winters wrote:
> * Michael ([EMAIL PROTECTED]) [000915 17:29]:
> > H.
> >
> > When I retrieve a cookie
> >
> > %cookies = Apache::Cookie->fetch;
> >
> > I get a hash that contains the name of the cookie as the key and a
> > scalar reference as the value.
> > Apache::Cookie=SCALAR(0xblah...)
> > Can't seem to unravel it to get at the
> > value. Using
> >
> > %xx = Apache::Cookie->parse($val);
> > gives an apparently empty hash, yet retrieving the headers via
> > Apache::Table yields the correct results
> >
> > Cookie=foo=bar
> >
> > cook name val
> >foo bar
> >
> >
> > So what am I doing wrong with Apache::Cookie that keeps me from
> > returning the cookie value.
> >
> > Michael
>
> The following seems to work for me in nabbing all the cookies sent and
> putting them into a hashref $cookies
>
>my $cookies = {};
>my $cookie_info = Apache::Cookie->fetch;
>foreach my $name ( keys %{ $cookie_info } ) {
> $cookies->{ $name } = $cookie_info->{ $name }->value;
>}
>
> HTH
>
> Chris
>
> --
> Chris Winters
> Senior Internet Developerintes.net
> [EMAIL PROTECTED] http://www.intes.net/
> Integrated hardware/software solutions to make the Internet work for you.
>