>
> The man page then says to use APR::Request::Cookie I should:
> my $jar = $r->jar;
> my $cookie = $jar->get("ISMH_SESSION_ID");
What is $r in this case? It should be an APR::Request::Apache2 or
(APR::Request::CGI I think) handle.
So, where $r is an Apache2::RequestRec object:
To set:
-------
my $cookie = APR::Request::Cookie->new(
$r->pool,
expires => '+7d',
value => 'value',
name => 'name'
) or die;
$r->err_headers_out->add( 'Set-Cookie', $cookie->as_string );
To read:
--------
my $req = APR::Request::Apache2->handle( $r );
my $jar = $req->jar;
my %cookies;
foreach my $key ( keys %$jar ) {
$cookies{$key} = $jar->get($key);
}
clint