httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: Apache2::Cookies - getting all names
Date Wed, 28 Dec 2005 20:11:41 GMT
"Philip M. Gollucci" <pgollucci@p6m7g8.com> writes:

> package Apache2::Cookie::Jar;
> sub cookies {
>
> 	my $cookies = Apache2::Cookie->fetch(@_);
>
> 	## iffy to return based on documentation from $cookies and @_
>
> }


More or less.  Something like this should work:

     sub cookies {
         return Apache2::Cookie->fetch(@_) if @_ == 2;
         my $cookies = Apache2::Cookies->fetch(@_);
         return wantarray ? keys %$cookies : $cookies;
     }

Of course the real problem here is test coverage.  We need more cookie
tests to validate the code.

-- 
Joe Schaefer


Mime
View raw message