develooper Front page | perl.perl5.porters | Postings from October 2003

Re: CGI::Cookie Warnings

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
October 22, 2003 13:10
Subject:
Re: CGI::Cookie Warnings
Message ID:
20031022201017.GL22077@plum.flirble.org
On Tue, Oct 21, 2003 at 11:20:36PM -0700, David Wheeler wrote:
> Lincoln,
> 
> Under some circumstances with Perl 5.8.1, I get this warning with 
> CGI::Cookie:
> 
>   Ambiguous use of -time resolved as -&time() at 
> /usr/local/lib/perl5/5.8.1/CGI/Cookie.pm line 223.
> 
> I believe that the attached simple patch addresses the issue. I've Cc'd 
> perl5-porters in the hope that the patch would also make it into the 
> core before the release of Perl 5.8.2.

[that bit makes sense to me - if an updated CGI.pm hits CPAN it can
get assimilated]


-  $self->{'max-age'} = CGI::Util::expire_calc($expires)-time if defined $expires;
+  $self->{'max-age'} = CGI::Util::expire_calc($expires) - time if defined $expires;

Eh? How on earth can whitespace be significant? :-(
Are you sure you were using perl and not some other language beginning with P?

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About