Hello community,

here is the log from the commit of package perl-HTTP-Cookies for 
openSUSE:Factory checked in at 2019-12-07 15:12:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-HTTP-Cookies (Old)
 and      /work/SRC/openSUSE:Factory/.perl-HTTP-Cookies.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-HTTP-Cookies"

Sat Dec  7 15:12:31 2019 rev:15 rq:753151 version:6.08

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-HTTP-Cookies/perl-HTTP-Cookies.changes      
2019-11-21 12:56:48.406562275 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-HTTP-Cookies.new.4691/perl-HTTP-Cookies.changes
    2019-12-07 15:14:43.639801458 +0100
@@ -1,0 +2,9 @@
+Tue Dec  3 03:16:55 UTC 2019 -  <[email protected]>
+
+- updated to 6.08
+   see /usr/share/doc/packages/perl-HTTP-Cookies/Changes
+
+  6.08      2019-12-02 15:58:32Z
+      - allow different "ignore_discard" value at save() time (GH#2) (Alex 
Peters)
+
+-------------------------------------------------------------------

Old:
----
  HTTP-Cookies-6.07.tar.gz

New:
----
  HTTP-Cookies-6.08.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-HTTP-Cookies.spec ++++++
--- /var/tmp/diff_new_pack.lpxm2t/_old  2019-12-07 15:14:47.827800864 +0100
+++ /var/tmp/diff_new_pack.lpxm2t/_new  2019-12-07 15:14:47.831800864 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-HTTP-Cookies
-Version:        6.07
+Version:        6.08
 Release:        0
 %define cpan_name HTTP-Cookies
 Summary:        HTTP cookie jars

++++++ HTTP-Cookies-6.07.tar.gz -> HTTP-Cookies-6.08.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Cookies-6.07/Changes 
new/HTTP-Cookies-6.08/Changes
--- old/HTTP-Cookies-6.07/Changes       2019-11-15 19:11:46.000000000 +0100
+++ new/HTTP-Cookies-6.08/Changes       2019-12-02 16:58:36.000000000 +0100
@@ -1,6 +1,9 @@
 Revision history for HTTP-Cookies.  The HTTP::Cookies module used to be bundled
 with the libwww-perl distribution.
 
+6.08      2019-12-02 15:58:32Z
+    - allow different "ignore_discard" value at save() time (GH#2) (Alex 
Peters)
+
 6.07      2019-11-15 18:11:42Z
     - Fix t/issue32.t on old perl versions (GH#59) (Bernhard M. Wiedemann)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Cookies-6.07/META.json 
new/HTTP-Cookies-6.08/META.json
--- old/HTTP-Cookies-6.07/META.json     2019-11-15 19:11:46.000000000 +0100
+++ new/HTTP-Cookies-6.08/META.json     2019-12-02 16:58:36.000000000 +0100
@@ -77,7 +77,7 @@
          "web" : "https://github.com/libwww-perl/HTTP-Cookies";
       }
    },
-   "version" : "6.07",
+   "version" : "6.08",
    "x_Dist_Zilla" : {
       "perl" : {
          "version" : "5.030000"
@@ -473,7 +473,7 @@
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.23.0",
+                  "git_version" : "2.24.0",
                   "repo_root" : "."
                }
             },
@@ -484,7 +484,7 @@
             "class" : "Dist::Zilla::Plugin::Git::Contributors",
             "config" : {
                "Dist::Zilla::Plugin::Git::Contributors" : {
-                  "git_version" : "2.23.0",
+                  "git_version" : "2.24.0",
                   "include_authors" : 0,
                   "include_releaser" : 1,
                   "order_by" : "name",
@@ -597,7 +597,7 @@
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.23.0",
+                  "git_version" : "2.24.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
@@ -614,12 +614,12 @@
                   "branch" : null,
                   "changelog" : "Changes",
                   "signed" : 0,
-                  "tag" : "v6.07",
+                  "tag" : "v6.08",
                   "tag_format" : "v%V",
                   "tag_message" : "v%V"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.23.0",
+                  "git_version" : "2.24.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
@@ -669,7 +669,7 @@
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.23.0",
+                  "git_version" : "2.24.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
@@ -689,7 +689,7 @@
                   "remotes_must_exist" : 1
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.23.0",
+                  "git_version" : "2.24.0",
                   "repo_root" : "."
                }
             },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Cookies-6.07/META.yml 
new/HTTP-Cookies-6.08/META.yml
--- old/HTTP-Cookies-6.07/META.yml      2019-11-15 19:11:46.000000000 +0100
+++ new/HTTP-Cookies-6.08/META.yml      2019-12-02 16:58:36.000000000 +0100
@@ -36,7 +36,7 @@
   bugtracker: https://github.com/libwww-perl/HTTP-Cookies/issues
   homepage: https://github.com/libwww-perl/HTTP-Cookies
   repository: https://github.com/libwww-perl/HTTP-Cookies.git
-version: '6.07'
+version: '6.08'
 x_Dist_Zilla:
   perl:
     version: '5.030000'
@@ -343,7 +343,7 @@
           allow_dirty_match: []
           changelog: Changes
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.23.0
+          git_version: 2.24.0
           repo_root: .
       name: '@Author::OALDERS/Git::Check'
       version: '2.046'
@@ -351,7 +351,7 @@
       class: Dist::Zilla::Plugin::Git::Contributors
       config:
         Dist::Zilla::Plugin::Git::Contributors:
-          git_version: 2.23.0
+          git_version: 2.24.0
           include_authors: 0
           include_releaser: 1
           order_by: name
@@ -438,7 +438,7 @@
           allow_dirty_match: []
           changelog: Changes
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.23.0
+          git_version: 2.24.0
           repo_root: .
         Dist::Zilla::Role::Git::StringFormatter:
           time_zone: local
@@ -451,11 +451,11 @@
           branch: ~
           changelog: Changes
           signed: 0
-          tag: v6.07
+          tag: v6.08
           tag_format: v%V
           tag_message: v%V
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.23.0
+          git_version: 2.24.0
           repo_root: .
         Dist::Zilla::Role::Git::StringFormatter:
           time_zone: local
@@ -492,7 +492,7 @@
             - (?^:^lib/.*\.pm$)
           changelog: Changes
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.23.0
+          git_version: 2.24.0
           repo_root: .
         Dist::Zilla::Role::Git::StringFormatter:
           time_zone: local
@@ -506,7 +506,7 @@
             - origin
           remotes_must_exist: 1
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.23.0
+          git_version: 2.24.0
           repo_root: .
       name: '@Author::OALDERS/Git::Push'
       version: '2.046'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Cookies-6.07/Makefile.PL 
new/HTTP-Cookies-6.08/Makefile.PL
--- old/HTTP-Cookies-6.07/Makefile.PL   2019-11-15 19:11:46.000000000 +0100
+++ new/HTTP-Cookies-6.08/Makefile.PL   2019-12-02 16:58:36.000000000 +0100
@@ -33,7 +33,7 @@
     "URI" => 0,
     "warnings" => 0
   },
-  "VERSION" => "6.07",
+  "VERSION" => "6.08",
   "test" => {
     "TESTS" => "t/*.t"
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Cookies-6.07/README.md 
new/HTTP-Cookies-6.08/README.md
--- old/HTTP-Cookies-6.07/README.md     2019-11-15 19:11:46.000000000 +0100
+++ new/HTTP-Cookies-6.08/README.md     2019-12-02 16:58:36.000000000 +0100
@@ -4,7 +4,7 @@
 
 # VERSION
 
-version 6.07
+version 6.08
 
 # SYNOPSIS
 
@@ -117,12 +117,14 @@
 
 - $cookie\_jar->save
 - $cookie\_jar->save( $file )
+- $cookie\_jar->save( file => $file, ignore\_discard => $ignore\_discard )
 
     This method file saves the state of the $cookie\_jar to a file.
     The state can then be restored later using the load() method.  If a
     filename is not specified we will use the name specified during
-    construction.  If the attribute _ignore\_discard_ is set, then we
-    will even save cookies that are marked to be discarded.
+    construction.  If the $ignore\_discard value is true (or not specified,
+    but attribute _ignore\_discard_ was set at cookie jar construction),
+    then we will even save cookies that are marked to be discarded.
 
     The default is to save a sequence of "Set-Cookie3" lines.
     "Set-Cookie3" is a proprietary LWP format, not known to be compatible
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Cookies-6.07/lib/HTTP/Cookies/Microsoft.pm 
new/HTTP-Cookies-6.08/lib/HTTP/Cookies/Microsoft.pm
--- old/HTTP-Cookies-6.07/lib/HTTP/Cookies/Microsoft.pm 2019-11-15 
19:11:46.000000000 +0100
+++ new/HTTP-Cookies-6.08/lib/HTTP/Cookies/Microsoft.pm 2019-12-02 
16:58:36.000000000 +0100
@@ -2,7 +2,7 @@
 
 use strict;
 
-our $VERSION = '6.07';
+our $VERSION = '6.08';
 
 require HTTP::Cookies;
 our @ISA=qw(HTTP::Cookies);
@@ -244,7 +244,7 @@
 
 =head1 VERSION
 
-version 6.07
+version 6.08
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Cookies-6.07/lib/HTTP/Cookies/Netscape.pm 
new/HTTP-Cookies-6.08/lib/HTTP/Cookies/Netscape.pm
--- old/HTTP-Cookies-6.07/lib/HTTP/Cookies/Netscape.pm  2019-11-15 
19:11:46.000000000 +0100
+++ new/HTTP-Cookies-6.08/lib/HTTP/Cookies/Netscape.pm  2019-12-02 
16:58:36.000000000 +0100
@@ -2,7 +2,7 @@
 
 use strict;
 
-our $VERSION = '6.07';
+our $VERSION = '6.08';
 
 require HTTP::Cookies;
 our @ISA=qw(HTTP::Cookies);
@@ -36,8 +36,14 @@
 
 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;
 
@@ -53,7 +59,7 @@
     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";
@@ -75,7 +81,7 @@
 
 =head1 VERSION
 
-version 6.07
+version 6.08
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Cookies-6.07/lib/HTTP/Cookies.pm 
new/HTTP-Cookies-6.08/lib/HTTP/Cookies.pm
--- old/HTTP-Cookies-6.07/lib/HTTP/Cookies.pm   2019-11-15 19:11:46.000000000 
+0100
+++ new/HTTP-Cookies-6.08/lib/HTTP/Cookies.pm   2019-12-02 16:58:36.000000000 
+0100
@@ -5,7 +5,7 @@
 use HTTP::Headers::Util qw(_split_header_words join_header_words);
 
 our $EPOCH_OFFSET;
-our $VERSION = '6.07';
+our $VERSION = '6.08';
 
 # Legacy: because "use "HTTP::Cookies" used be the ONLY way
 #  to load the class HTTP::Cookies::Netscape.
@@ -426,10 +426,16 @@
 sub save
 {
     my $self = shift;
-    my $file = shift || $self->{'file'} || return;
+    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) or die "Can't open $file: $!";
     print {$fh} "#LWP-Cookies-1.0\n";
-    print {$fh} $self->as_string(!$self->{ignore_discard});
+    print {$fh} $self->as_string(!$args{'ignore_discard'});
     close $fh or die "Can't close $file: $!";
     1;
 }
@@ -673,7 +679,7 @@
 
 =head1 VERSION
 
-version 6.07
+version 6.08
 
 =head1 SYNOPSIS
 
@@ -792,11 +798,14 @@
 
 =item $cookie_jar->save( $file )
 
+=item $cookie_jar->save( file => $file, ignore_discard => $ignore_discard )
+
 This method file saves the state of the $cookie_jar to a file.
 The state can then be restored later using the load() method.  If a
 filename is not specified we will use the name specified during
-construction.  If the attribute I<ignore_discard> is set, then we
-will even save cookies that are marked to be discarded.
+construction.  If the $ignore_discard value is true (or not specified,
+but attribute I<ignore_discard> was set at cookie jar construction),
+then we will even save cookies that are marked to be discarded.
 
 The default is to save a sequence of "Set-Cookie3" lines.
 "Set-Cookie3" is a proprietary LWP format, not known to be compatible
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Cookies-6.07/t/cookies.t 
new/HTTP-Cookies-6.08/t/cookies.t
--- old/HTTP-Cookies-6.07/t/cookies.t   2019-11-15 19:11:46.000000000 +0100
+++ new/HTTP-Cookies-6.08/t/cookies.t   2019-12-02 16:58:36.000000000 +0100
@@ -1,7 +1,7 @@
 #!perl -w
 
 use Test;
-plan tests => 77;
+plan tests => 79;
 
 use HTTP::Cookies;
 use HTTP::Request;
@@ -698,6 +698,38 @@
 ok($a[0], undef);
 ok($a[1], 42);
 
+# Test ignore_discard argument of save()
+$c = HTTP::Cookies->new( ignore_discard => 0 );
+interact($c, 'http://example.com/', 'foo=bar; Discard;');
+$old = $c->as_string;
+$c->save( file => $file, ignore_discard => 1 );
+undef $c;
+
+$c = HTTP::Cookies->new( ignore_discard => 0 );
+$c->load($file);
+unlink($file) || warn "Can't unlink $file: $!";
+
+ok($c->as_string, $old);
+
+$c = HTTP::Cookies::Netscape->new( ignore_discard => 0 );
+$req = HTTP::Request->new(GET => "http://1.1.1.1/";);
+$req->header("Host", "www.acme.com:80");
+$res = HTTP::Response->new(200, "OK");
+$res->request($req);
+$res->header("Set-Cookie" => "foo=bar; path=/; discard; expires=Wednesday, 
09-Nov-$year_plus_one 23:12:40 GMT");
+$c->extract_cookies($res);
+$old = $c->as_string;
+$c->save( file => $file, ignore_discard => 1 );
+undef $c;
+
+$c = HTTP::Cookies::Netscape->new( ignore_discard => 0 );
+$c->load($file);
+$req = HTTP::Request->new(GET => "http://www.acme.com/foo/bar";);
+$c->add_cookie_header($req);
+$h = $req->header("Cookie");
+ok($h =~ /foo=bar/);
+unlink($file) || warn "Can't unlink $file: $!";
+
 
 #-------------------------------------------------------------------
 


Reply via email to