Kurt Hansen <[EMAIL PROTECTED]> writes:
[...]
> A few things that caused me more pain than I care to admit:
>
> 1. Apache::Cookie v2 requires an Apache::RequestRec environment
> variable instead of an Apache::Request variable. Using the latter
> caused a segmentation fault.
If so, that's really a bug, not a portability issue. Apache::Request
objects are derived from Apache::RequestRec, so it should be ok to pass
them to any Apache::Cookie methods which expect an Apache::RequestRec
object.
Can you please show us the code which segfaults?
> 3. Expires method works differently between v1 and v2 of
> Apache::Cookie->new. An empty variable for -expires will default to
> "now" in v2 which means the cookie won't be set since it expires
> immediately. In v1, an empty -expires created a session cookie. To
> get the same behavior in v2, just don't supply an -expires parameter
> in new.
Interesting. It looks like CGI::Cookie has the v2 behavior.
$ perl -MCGI::Cookie -wle '$c = new CGI::Cookie
-name=>1, -value=>2, -expires=>"";
print $c->as_string'
1=2; path=/; expires=Mon, 15-Nov-2004 16:15:09 GMT
I'm not sure if this is a bug in libapreq2. Any other opinions
out there?
--
Joe Schaefer
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html