This same problem occurs if I call A2::C->new without any value argument
("...new (-name => 'some_cookie', -expire => '-1D', -path => ...,
-secure => 0)"), though I didn't verify the A:C->new behavior with no
-value at all (only with -value => undef...).

Derek


Derek R. Price wrote:
> Hello,
> 
> If this isn't the correct place to report this problem, please excuse
> the noise and redirect me...
> 
> Apache::Cookie->new used to deal gracefully with an undefined -value
> argument (like: "...new (-name => 'some_cookie', -value => undef,
> ...)"), at least when -expire was in the past ("-1D" in my tests).  It
> would return a new cookie with an empty value which could be saved to
> expire the old cookie.
> 
> Now, using the same Perl source with Apache2::Cookie->new, an undefined
> value is returned instead of the new cookie.  At best, this appears to
> be an API change and should be documented.  At worst it appears to be a
> bug in libapreq2 that should be fixed.
> 
> The documentation for A2::C->new states that -value should be an
> arrayref, hashref, or string, but it seems to me that either the
> behavior in response to an undefined -value should be documented or
> trapped internally and an error issued via Carp::croak() or whatever.
> 
> I discovered this using libapreq2 2.0.7.
> 
> Thanks,
> 
> Derek


-- 
Derek R. Price
CVS Solutions Architect
Get CVS support at Ximbiot <http://ximbiot.com>!
v: +1 248.835.1260
f: +1 248.835.1263
<mailto:[EMAIL PROTECTED]>

Reply via email to