perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "cfaust-dougot" <>
Subject Cookie help - using both and APR::Request::Cookie
Date Wed, 28 May 2008 00:41:37 GMT
I taking over some really old code and I'm in the process of converting it over to mp2. I
want to be able to use APR::Request::Cookie to create the cookie for the new things I'm doing
but I need to create it exactly like is currently doing so the old code will continue
to work until I get everthing updated.
I'm hoping someone knows both methods enough to tell me what I'm doing wrong.
The cookie is being created like:
I do my cookies like:
 my $packed_cookie = APR::Request::Cookie->new($r->pool,
              name  => 'name',
              value  => $cookie_value,              
              path  => '/',
              domain => '',
              expires => +5y,
 $r->err_headers_out->add('Set-Cookie' => $packed_cookie->as_string);
For the value I made an array
@cookie_value = ('val1','val2','val3','val4','val5',val6','val7');
In $packed_cookie I tried using @cookie_value directly, I tried it as an arrayref ($cookie_value),
I tried it like [@cookie_value] etc and not matter what I do I can't get the old code to read
it via
my ($val1,$val2,$val3,$val4,$val5,$val6,$val7) = $query->cookie(-name=>'name');
The cookie is getting set though, I can view it from within Mozilla. It just isn't being read
Does anyone know what I'm doing wrong?

View raw message