Hello community,

here is the log from the commit of package perl-Scalar-List-Utils for 
openSUSE:Factory checked in at 2019-08-15 15:42:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Scalar-List-Utils (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Scalar-List-Utils.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Scalar-List-Utils"

Thu Aug 15 15:42:56 2019 rev:15 rq:721982 version:1.51

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Scalar-List-Utils/perl-Scalar-List-Utils.changes
    2018-02-26 23:22:58.387035609 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-Scalar-List-Utils.new.9556/perl-Scalar-List-Utils.changes
  2019-08-15 15:42:59.983201006 +0200
@@ -1,0 +2,15 @@
+Fri Aug  9 05:26:27 UTC 2019 - Stephan Kulow <co...@suse.com>
+
+- updated to 1.51
+   see /usr/share/doc/packages/perl-Scalar-List-Utils/Changes
+
+  1.51 -- 2019-08-08 14:31:32
+       [CHANGES]
+        * Add TO_JSON to List::Util::_Pair (thanks ilmari)
+        * Various minor docs fixes
+       
+       [BUGFIXES]
+        * Don't segfault in subname() on deleted stashes (thanks ilmari)
+        * Fix uniqnum for large floats and numeric strings (thanks ilmari)
+
+-------------------------------------------------------------------

Old:
----
  Scalar-List-Utils-1.50.tar.gz

New:
----
  Scalar-List-Utils-1.51.tar.gz

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

Other differences:
------------------
++++++ perl-Scalar-List-Utils.spec ++++++
--- /var/tmp/diff_new_pack.t6ydmo/_old  2019-08-15 15:43:00.887200797 +0200
+++ /var/tmp/diff_new_pack.t6ydmo/_new  2019-08-15 15:43:00.887200797 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Scalar-List-Utils
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,18 +12,18 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           perl-Scalar-List-Utils
-Version:        1.50
+Version:        1.51
 Release:        0
 %define cpan_name Scalar-List-Utils
 Summary:        Common Scalar and List utility subroutines
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Libraries/Perl
-Url:            http://search.cpan.org/dist/Scalar-List-Utils/
+Url:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -39,11 +39,11 @@
 find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
+make %{?_smp_mflags}
 
 %check
-%{__make} test
+make test
 
 %install
 %perl_make_install

++++++ Scalar-List-Utils-1.50.tar.gz -> Scalar-List-Utils-1.51.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/Changes 
new/Scalar-List-Utils-1.51/Changes
--- old/Scalar-List-Utils-1.50/Changes  2018-02-20 20:24:25.000000000 +0100
+++ new/Scalar-List-Utils-1.51/Changes  2019-08-08 15:33:06.000000000 +0200
@@ -1,3 +1,12 @@
+1.51 -- 2019-08-08 14:31:32
+       [CHANGES]
+        * Add TO_JSON to List::Util::_Pair (thanks ilmari)
+        * Various minor docs fixes
+       
+       [BUGFIXES]
+        * Don't segfault in subname() on deleted stashes (thanks ilmari)
+        * Fix uniqnum for large floats and numeric strings (thanks ilmari)
+
 1.50 -- 2018-02-20 19:13:27
        [CHANGES]
         * Added head() and tail() functions (thanks preaction)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/ListUtil.xs 
new/Scalar-List-Utils-1.51/ListUtil.xs
--- old/Scalar-List-Utils-1.50/ListUtil.xs      2018-02-20 20:09:32.000000000 
+0100
+++ new/Scalar-List-Utils-1.51/ListUtil.xs      2019-08-06 14:12:28.000000000 
+0200
@@ -1177,12 +1177,15 @@
                 /* clone the value so we don't invoke magic again */
                 arg = sv_mortalcopy(arg);
 
-            if(SvUOK(arg))
+            if(SvOK(arg) && !(SvUOK(arg) || SvIOK(arg) || SvNOK(arg)))
+                SvNV(arg); /* sets SVf_IOK/SVf_UOK if it's an integer */
+
+            if(!SvOK(arg) || SvUOK(arg))
                 sv_setpvf(keysv, "%" UVuf, SvUV(arg));
             else if(SvIOK(arg))
                 sv_setpvf(keysv, "%" IVdf, SvIV(arg));
             else
-                sv_setpvf(keysv, "%" NVgf, SvNV(arg));
+                sv_setpvf(keysv, "%.15" NVgf, SvNV(arg));
 #ifdef HV_FETCH_EMPTY_HE
             he = (HE*) hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, 
HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0);
             if (HeVAL(he))
@@ -1601,15 +1604,18 @@
     /* under debugger, provide information about sub location */
     if (PL_DBsub && CvGV(cv)) {
         HV* DBsub = GvHV(PL_DBsub);
-        HE* old_data;
+        HE* old_data = NULL;
 
         GV* oldgv = CvGV(cv);
         HV* oldhv = GvSTASH(oldgv);
-        SV* old_full_name = sv_2mortal(newSVpvn_flags(HvNAME(oldhv), 
HvNAMELEN_get(oldhv), HvNAMEUTF8(oldhv) ? SVf_UTF8 : 0));
-        sv_catpvn(old_full_name, "::", 2);
-        sv_catpvn_flags(old_full_name, GvNAME(oldgv), GvNAMELEN(oldgv), 
GvNAMEUTF8(oldgv) ? SV_CATUTF8 : SV_CATBYTES);
 
-        old_data = hv_fetch_ent(DBsub, old_full_name, 0, 0);
+        if (oldhv) {
+            SV* old_full_name = sv_2mortal(newSVpvn_flags(HvNAME(oldhv), 
HvNAMELEN_get(oldhv), HvNAMEUTF8(oldhv) ? SVf_UTF8 : 0));
+            sv_catpvn(old_full_name, "::", 2);
+            sv_catpvn_flags(old_full_name, GvNAME(oldgv), GvNAMELEN(oldgv), 
GvNAMEUTF8(oldgv) ? SV_CATUTF8 : SV_CATBYTES);
+
+            old_data = hv_fetch_ent(DBsub, old_full_name, 0, 0);
+        }
 
         if (old_data && HeVAL(old_data)) {
             SV* new_full_name = sv_2mortal(newSVpvn_flags(HvNAME(stash), 
HvNAMELEN_get(stash), HvNAMEUTF8(stash) ? SVf_UTF8 : 0));
@@ -1660,6 +1666,7 @@
 PREINIT:
     CV *cv;
     GV *gv;
+    const char *stashname;
 PPCODE:
     if (!SvROK(code) && SvGMAGICAL(code))
         mg_get(code);
@@ -1670,7 +1677,12 @@
     if(!(gv = CvGV(cv)))
         XSRETURN(0);
 
-    mPUSHs(newSVpvf("%s::%s", HvNAME(GvSTASH(gv)), GvNAME(gv)));
+    if(GvSTASH(gv))
+        stashname = HvNAME(GvSTASH(gv));
+    else
+        stashname = "__ANON__";
+
+    mPUSHs(newSVpvf("%s::%s", stashname, GvNAME(gv)));
     XSRETURN(1);
 
 BOOT:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/META.json 
new/Scalar-List-Utils-1.51/META.json
--- old/Scalar-List-Utils-1.50/META.json        2018-02-20 20:25:58.000000000 
+0100
+++ new/Scalar-List-Utils-1.51/META.json        2019-08-08 15:34:32.000000000 
+0200
@@ -4,13 +4,13 @@
       "Graham Barr <gb...@cpan.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "perl_5"
    ],
    "meta-spec" : {
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
-      "version" : "2"
+      "version" : 2
    },
    "name" : "Scalar-List-Utils",
    "no_index" : {
@@ -49,6 +49,6 @@
          "web" : "https://github.com/Scalar-List-Utils/Scalar-List-Utils";
       }
    },
-   "version" : "1.50",
-   "x_serialization_backend" : "JSON::PP version 2.27400_02"
+   "version" : "1.51",
+   "x_serialization_backend" : "JSON::PP version 2.97001"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/META.yml 
new/Scalar-List-Utils-1.51/META.yml
--- old/Scalar-List-Utils-1.50/META.yml 2018-02-20 20:25:58.000000000 +0100
+++ new/Scalar-List-Utils-1.51/META.yml 2019-08-08 15:34:32.000000000 +0200
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 
2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -23,5 +23,5 @@
 resources:
   bugtracker: 
https://rt.cpan.org/Public/Dist/Display.html?Name=Scalar-List-Utils
   repository: https://github.com/Scalar-List-Utils/Scalar-List-Utils.git
-version: '1.50'
+version: '1.51'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/lib/List/Util/XS.pm 
new/Scalar-List-Utils-1.51/lib/List/Util/XS.pm
--- old/Scalar-List-Utils-1.50/lib/List/Util/XS.pm      2018-02-20 
20:25:27.000000000 +0100
+++ new/Scalar-List-Utils-1.51/lib/List/Util/XS.pm      2019-08-08 
15:33:37.000000000 +0200
@@ -3,8 +3,8 @@
 use warnings;
 use List::Util;
 
-our $VERSION = "1.50";       # FIXUP
-$VERSION = eval $VERSION;    # FIXUP
+our $VERSION = "1.51";       # FIXUP
+$VERSION =~ tr/_//d;         # FIXUP
 
 1;
 __END__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/lib/List/Util.pm 
new/Scalar-List-Utils-1.51/lib/List/Util.pm
--- old/Scalar-List-Utils-1.50/lib/List/Util.pm 2018-02-20 20:25:27.000000000 
+0100
+++ new/Scalar-List-Utils-1.51/lib/List/Util.pm 2019-08-08 15:33:37.000000000 
+0200
@@ -15,9 +15,9 @@
   all any first min max minstr maxstr none notall product reduce sum sum0 
shuffle uniq uniqnum uniqstr
   head tail pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst
 );
-our $VERSION    = "1.50";
+our $VERSION    = "1.51";
 our $XS_VERSION = $VERSION;
-$VERSION    = eval $VERSION;
+$VERSION =~ tr/_//d;
 
 require XSLoader;
 XSLoader::load('List::Util', $XS_VERSION);
@@ -38,6 +38,7 @@
 # For objects returned by pairs()
 sub List::Util::_Pair::key   { shift->[0] }
 sub List::Util::_Pair::value { shift->[1] }
+sub List::Util::_Pair::TO_JSON { [ @{+shift} ] }
 
 =head1 NAME
 
@@ -341,6 +342,9 @@
        ...
     }
 
+Since version C<1.51> they also have a C<TO_JSON> method to ease
+serialisation.
+
 =head2 unpairs
 
     my @kvlist = unpairs @pairs
@@ -557,6 +561,8 @@
 
     my @values = head $size, @list;
 
+I<Since version 1.50.>
+
 Returns the first C<$size> elements from C<@list>. If C<$size> is negative, 
returns
 all but the last C<$size> elements from C<@list>.
 
@@ -570,6 +576,8 @@
 
     my @values = tail $size, @list;
 
+I<Since version 1.50.>
+
 Returns the last C<$size> elements from C<@list>. If C<$size> is negative, 
returns
 all but the first C<$size> elements from C<@list>.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/lib/Scalar/Util.pm 
new/Scalar-List-Utils-1.51/lib/Scalar/Util.pm
--- old/Scalar-List-Utils-1.50/lib/Scalar/Util.pm       2018-02-20 
20:25:27.000000000 +0100
+++ new/Scalar-List-Utils-1.51/lib/Scalar/Util.pm       2019-08-08 
15:33:37.000000000 +0200
@@ -17,8 +17,8 @@
   dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
   tainted
 );
-our $VERSION    = "1.50";
-$VERSION   = eval $VERSION;
+our $VERSION    = "1.51";
+$VERSION =~ tr/_//d;
 
 require List::Util; # List::Util loads the XS
 List::Util->VERSION( $VERSION ); # Ensure we got the right XS version 
(RT#100863)
@@ -276,8 +276,8 @@
 
     my $fh = openhandle( $fh );
 
-Returns C<$fh> itself if C<$fh> may be used as a filehandle and is open, or is
-is a tied handle. Otherwise C<undef> is returned.
+Returns C<$fh> itself, if C<$fh> may be used as a filehandle and is open, or if
+it is a tied handle. Otherwise C<undef> is returned.
 
     $fh = openhandle(*STDIN);           # \*STDIN
     $fh = openhandle(\*STDIN);          # \*STDIN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/lib/Sub/Util.pm 
new/Scalar-List-Utils-1.51/lib/Sub/Util.pm
--- old/Scalar-List-Utils-1.50/lib/Sub/Util.pm  2018-02-20 20:25:27.000000000 
+0100
+++ new/Scalar-List-Utils-1.51/lib/Sub/Util.pm  2019-08-08 15:33:37.000000000 
+0200
@@ -15,8 +15,8 @@
   subname set_subname
 );
 
-our $VERSION    = "1.50";
-$VERSION   = eval $VERSION;
+our $VERSION    = "1.51";
+$VERSION =~ tr/_//d;
 
 require List::Util; # as it has the XS
 List::Util->VERSION( $VERSION ); # Ensure we got the right XS version 
(RT#100863)
@@ -95,8 +95,10 @@
 Returns the name of the given C<$code> reference, if it has one. Normal named
 subs will give a fully-qualified name consisting of the package and the
 localname separated by C<::>. Anonymous code references will give C<__ANON__>
-as the localname. If a name has been set using L</set_subname>, this name will
-be returned instead.
+as the localname. If the package the code was compiled in has been deleted
+(e.g. using C<delete_package> from L<Symbol>), C<__ANON__> will be returned as
+the package name. If a name has been set using L</set_subname>, this name will 
be
+returned instead.
 
 This function was inspired by C<sub_fullname> from L<Sub::Identify>. The
 remaining functions that C<Sub::Identify> implements can easily be emulated
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/t/pair.t 
new/Scalar-List-Utils-1.51/t/pair.t
--- old/Scalar-List-Utils-1.50/t/pair.t 2018-02-20 20:25:27.000000000 +0100
+++ new/Scalar-List-Utils-1.51/t/pair.t 2019-08-08 15:33:37.000000000 +0200
@@ -3,8 +3,9 @@
 use strict;
 use warnings;
 
-use Test::More tests => 27;
+use Test::More tests => 29;
 use List::Util qw(pairgrep pairfirst pairmap pairs unpairs pairkeys 
pairvalues);
+use Scalar::Util qw(blessed);
 
 no warnings 'misc'; # avoid "Odd number of elements" warnings most of the time
 
@@ -104,6 +105,10 @@
   my @p = pairs one => 1, two => 2;
   is( $p[0]->key,   "one", 'pairs ->key' );
   is( $p[0]->value, 1,     'pairs ->value' );
+  is_deeply( $p[0]->TO_JSON,
+             [ one => 1 ],
+             'pairs ->TO_JSON' );
+  ok( !blessed($p[0]->TO_JSON) , 'pairs ->TO_JSON is not blessed' );
 }
 
 is_deeply( [ unpairs [ four => 4 ], [ five => 5 ], [ six => 6 ] ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/t/subname.t 
new/Scalar-List-Utils-1.51/t/subname.t
--- old/Scalar-List-Utils-1.50/t/subname.t      2018-02-20 20:25:27.000000000 
+0100
+++ new/Scalar-List-Utils-1.51/t/subname.t      2019-08-08 15:33:37.000000000 
+0200
@@ -3,10 +3,11 @@
 
 BEGIN { $^P |= 0x210 }
 
-use Test::More tests => 18;
+use Test::More tests => 21;
 
 use B::Deparse;
 use Sub::Util qw( subname set_subname );
+use Symbol qw( delete_package ) ;
 
 {
   sub localfunc {}
@@ -78,4 +79,18 @@
     'subname of set_subname');
 }
 
+# this used to segfault
+
+{
+    sub ToDelete::foo {}
+
+    my $foo = \&ToDelete::foo;
+
+    delete_package 'ToDelete';
+
+    is( subname($foo), "$]" >= 5.010 ? '__ANON__::foo' : 'ToDelete::foo', 
'subname in deleted package' );
+    ok( set_subname('NewPackage::foo', $foo), 'rename from deleted package' );
+    is( subname($foo), 'NewPackage::foo', 'subname after rename' );
+}
+
 # vim: ft=perl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.50/t/uniq.t 
new/Scalar-List-Utils-1.51/t/uniq.t
--- old/Scalar-List-Utils-1.50/t/uniq.t 2018-02-20 20:25:27.000000000 +0100
+++ new/Scalar-List-Utils-1.51/t/uniq.t 2019-08-08 15:33:37.000000000 +0200
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 30;
+use Test::More tests => 33;
 use List::Util qw( uniqnum uniqstr uniq );
 
 use Tie::Array;
@@ -75,6 +75,18 @@
            [ 1, 1.1, 1.2, 1.3 ],
            'uniqnum distinguishes floats' );
 
+{
+    my @nums = map $_+0.1, 1e7..1e7+5;
+    is_deeply( [ uniqnum @nums ],
+               [ @nums ],
+               'uniqnum distinguishes large floats' );
+
+    my @strings = map "$_", @nums;
+    is_deeply( [ uniqnum @strings ],
+               [ @strings ],
+               'uniqnum distinguishes large floats (stringified)' );
+}
+
 # Hard to know for sure what an Inf is going to be. Lets make one
 my $Inf = 0 + 1E1000;
 my $NaN;
@@ -84,7 +96,7 @@
            [ 0, 1, 12345, $Inf, -$Inf, $NaN ],
            'uniqnum preserves the special values of +-Inf and Nan' );
 
-{
+SKIP: {
     my $maxuint = ~0;
     my $maxint = ~0 >> 1;
     my $minint = -(~0 >> 1) - 1;
@@ -94,6 +106,15 @@
     is_deeply( [ uniqnum @nums, 1.0 ],
                [ @nums ],
                'uniqnum preserves uniqness of full integer range' );
+
+    my @strs = map "$_", @nums;
+
+    skip( "Perl $] doesn't stringify UV_MAX right ($maxuint)", 1 )
+        if $maxuint !~ /\A[0-9]+\z/;
+
+    is_deeply( [ uniqnum @strs, "1.0" ],
+               [ @strs ],
+               'uniqnum preserves uniqness of full integer range 
(stringified)' );
 }
 
 {


Reply via email to