* will trillich ([EMAIL PROTECTED]) [010617 23:04]:
> mine is similar:
> 
>       $r->log_error( qq(...id=$ID, sending cookie) );
>       my $cookie =
>               Apache::Cookie->new( $r,
>                       -name   => $cookie_name,
>                       -value  => $ID         ,
>                       -domain => $r->hostname,
>                       -path   => '/'         ,
>               );
>       $r->header_out('Set-Cookie', => $cookie);
> 
> which sets a cookie value of "SCALAR(0x863c9f8)" instead of the
> $ID string that shows up in the log, which is
> 
>       ...id=483dd0e2202accce6d4d3e07d976bfdc, sending cookie
> 
> in the original ticket example above, -value is a hashref:
> 
>       -value => { ID => $ID }
> 
> instead of
> 
>       -value => $ID
> 
> as the Apache::Cookie manpage suggests (a plain scalar value).
> 
> this worked just fine with CGI::Cookie (without the $r, of
> course) -- can't get it to return the actual scalar value with
> Apache::Cookie...
> 
> ideas? help!

>From 'perldoc Apache::Cookie'

   bake
       Put cookie in the oven to bake.  (Add a Set-Cookie
       header to the outgoing headers table.)

           $cookie->bake;

   as_string
       Format the cookie object as a string:

           #same as $cookie->bake
           $r->err_headers_out->add("Set-Cookie" => $cookie->as_string);


HTH

Chris

-- 
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.

Reply via email to