I'm down to the last thing I need to handle without CGI.pm to get rid of it, 
cookies... But I'm having a problem..
 
I've tried both Apache2::Cookie and APR::Request::Cookie (from the posts I read 
I got the impression it was better to use ARP::Request::Cookie then 
Apache2::Cookie).
 
The problem I'm having is the cookie value I'm getting is 
"cookie_name=cookie_value", pretty much the same thing being talked about here 
http://www.gossamer-threads.com/lists/modperl/modperl/82277?search_string=APR%3A%3ARequest%3A%3ACookie;#82277
 
Here is how I've tried setting the cookie (seems to be fine)
 
my $packed_cookie = APR::Request::Cookie->new($r->pool,
                 name => 'ISMH_SESSION_ID',
                 value => someval,
                 expires => '+7d',
                 );
$r->err_headers_out->add('Set-Cookie' => $packed_cookie->as_string); 
 
The man page then says to use APR::Request::Cookie I should:
my $jar = $r->jar;
my $cookie = $jar->get("ISMH_SESSION_ID");
 
That results in the error of "Can't call method "get" without a package or 
object reference"
 
If I use Apache2::Cookie all the way
 my $cookie_req = Apache2::Cookie::Jar->new($r);
 my $cookie = $cookie_req->cookies("ISMH_SESSION_ID");

I get "cookie_name=cookie_value".
I've tried the freeze and thaw methods, but there was no change... I even tried 
updating libpreq from version 2.07 to 2.08 and there was no change.
 
Am I missing something??
 
Thanks
-Chris

Apache/2.0.55 (Ubuntu) PHP/5.1.6 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 
Perl/v5.8.8 configured

Reply via email to