diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-07 22:52:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-07 22:52:33 +0000 |
commit | 11c6e5fc65f26ba5219997d19707b998a9abf26d (patch) | |
tree | a1dc8073a679611d3f09c01eda006cc3f6f846b1 /Master/tlpkg/tlperl/site/lib/HTTP/Cookies/Netscape.pm | |
parent | a6593bd4f2eb12ae25540de026f7f9ebcf230a2f (diff) |
tl20 perl 5.30.1 for Windows, from Siep
git-svn-id: svn://tug.org/texlive/trunk@54166 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/site/lib/HTTP/Cookies/Netscape.pm')
-rw-r--r-- | Master/tlpkg/tlperl/site/lib/HTTP/Cookies/Netscape.pm | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Master/tlpkg/tlperl/site/lib/HTTP/Cookies/Netscape.pm b/Master/tlpkg/tlperl/site/lib/HTTP/Cookies/Netscape.pm index 8fbac888499..28a59d4feff 100644 --- a/Master/tlpkg/tlperl/site/lib/HTTP/Cookies/Netscape.pm +++ b/Master/tlpkg/tlperl/site/lib/HTTP/Cookies/Netscape.pm @@ -1,12 +1,11 @@ package HTTP::Cookies::Netscape; use strict; -use vars qw(@ISA); -our $VERSION = '6.04'; +our $VERSION = '6.08'; require HTTP::Cookies; -@ISA=qw(HTTP::Cookies); +our @ISA=qw(HTTP::Cookies); sub load { @@ -37,8 +36,14 @@ sub load sub save { - my($self, $file) = @_; - $file ||= $self->{'file'} || return; + my $self = shift; + my %args = ( + file => $self->{'file'}, + ignore_discard => $self->{'ignore_discard'}, + @_ == 1 ? ( file => $_[0] ) : @_ + ); + Carp::croak('Unexpected argument to save method') if keys %args > 2; + my $file = $args{'file'} || return; open(my $fh, '>', $file) || return; @@ -54,7 +59,7 @@ EOT my $now = time - $HTTP::Cookies::EPOCH_OFFSET; $self->scan(sub { my ($version, $key, $val, $path, $domain, $port, $path_spec, $secure, $expires, $discard, $rest) = @_; - return if $discard && !$self->{ignore_discard}; + return if $discard && !$args{'ignore_discard'}; $expires = $expires ? $expires - $HTTP::Cookies::EPOCH_OFFSET : 0; return if $now > $expires; $secure = $secure ? "TRUE" : "FALSE"; @@ -76,7 +81,7 @@ HTTP::Cookies::Netscape - Access to Netscape cookies files =head1 VERSION -version 6.04 +version 6.08 =head1 SYNOPSIS @@ -114,7 +119,7 @@ Gisle Aas <gisle@activestate.com> =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2002-2017 by Gisle Aas. +This software is copyright (c) 2002-2019 by Gisle Aas. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. |