Front page | perl.perl5.porters |
Postings from October 2003
Re: CGI::Cookie Warnings
Thread Previous
|
Thread Next
From:
chromatic
Date:
October 22, 2003 12:57
Subject:
Re: CGI::Cookie Warnings
Message ID:
1066852522.1276.29.camel@localhost
On Tue, 2003-10-21 at 23:20, David Wheeler wrote:
> 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.
--- /Users/david/Desktop/Cookie.pm Tue Oct 21 23:12:04 2003
+++ /usr/local/lib/perl5/5.8.1/CGI/Cookie.pm Tue Oct 21 23:11:24 2003
@@ -220,7 +220,7 @@
sub max_age {
my $self = shift;
my $expires = shift;
- $self->{'max-age'} = CGI::Util::expire_calc($expires)-time if defined
$expires;
+ $self->{'max-age'} = CGI::Util::expire_calc($expires) - time if
defined $expires;
return $self->{'max-age'};
}
Why not make it very explicit with time()?
-- c
Thread Previous
|
Thread Next