Hello community,

here is the log from the commit of package perl-Want for openSUSE:Factory 
checked in at 2016-03-16 10:33:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Want (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Want.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Want"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Want/perl-Want.changes      2015-05-02 
17:44:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Want.new/perl-Want.changes 2016-03-16 
10:33:58.000000000 +0100
@@ -1,0 +2,39 @@
+Tue Mar  8 11:18:53 UTC 2016 - co...@suse.com
+
+- updated to 0.29
+   see /usr/share/doc/packages/perl-Want/Changes
+
+  
+  0.27  Thu 25 Feb 2016 21:26:04 GMT
+      - perl 5.23.8 breaks the hack we were using to implement double_return.
+  
+      This patch from David Mitchell fixes it. See 
https://rt.cpan.org/Ticket/Display.html?id=112226
+  
+      David wrote:
+  
+      > Running with a debugging perl-5.23.8 will show assertion failures in 
the Want test suite. It's because PL_comppad/PL_curpad save/restore is now done 
by the context stack / cx_popsub() rather than as previously on the savestack / 
LEAVE.
+  
+      > This stops the double_return() 'convert CXt_SUB to CXt_NULL' hack from 
working properly, as PL_comppad is no longer restored when transitioning from 
the inner to outer sub. The attached patch substitutes one evil hack for 
another: it keeps the CXt_SUB context stack entry, but sets its retop field to 
point to the return op again (rather than its caller) so that the return op 
gets called twice (with a bit of markstack hackery to ensure there are two 
marks for the two returns to pop).
+  
+      > rreturn and lnoreturn are also a bit under-tested. In particular, 
there are no tests for rreturn in list context. I added such a test, but more 
need adding.
+  
+      > I can see this hack breaking again in the future. Perhaps in the long 
term
+      > rreturn() and lnoreturn() should be implemented using custom ops???
+  
+      > Dave M.
+  
+  0.28  Thu 25 Feb 2016 22:02:42 GMT
+      - Fix test failure in 5.14
+      - Fix test failure in 5.23.9 (using a patch from Slaven Rezic)
+        
http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/Want-0.26-RT112226.patch
+  
+  0.29  Fri 26 Feb 2016 04:42:19 GMT
+      - Restore compatibility with certain older perl versions (5.10 and 5.12)
+  
+        It seems that “ATTRS: lvalue” doesn’t work with older perls, but that 
you can
+        forward-declare the method in Perl code with the :lvalue attribute 
with the same
+        effect.
+  
+        This version of Want is still broken with perl 5.8, for reasons I 
haven’t investigated.
+
+-------------------------------------------------------------------

Old:
----
  Want-0.26.tar.gz

New:
----
  Want-0.29.tar.gz

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

Other differences:
------------------
++++++ perl-Want.spec ++++++
--- /var/tmp/diff_new_pack.kUSWmd/_old  2016-03-16 10:33:59.000000000 +0100
+++ /var/tmp/diff_new_pack.kUSWmd/_new  2016-03-16 10:33:59.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Want
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Want
-Version:        0.26
+Version:        0.29
 Release:        0
 %define cpan_name Want
 Summary:        Generalisation of C<Wantarray>

++++++ Want-0.26.tar.gz -> Want-0.29.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Want-0.26/Changes new/Want-0.29/Changes
--- old/Want-0.26/Changes       2015-04-28 13:33:22.000000000 +0200
+++ new/Want-0.29/Changes       2016-02-26 05:42:33.000000000 +0100
@@ -142,3 +142,35 @@
         C<op_sibling> directly. ”
      
       Thanks to Reini Urban for the patch.
+
+0.27  Thu 25 Feb 2016 21:26:04 GMT
+    - perl 5.23.8 breaks the hack we were using to implement double_return.
+
+    This patch from David Mitchell fixes it. See 
https://rt.cpan.org/Ticket/Display.html?id=112226
+
+    David wrote:
+
+    > Running with a debugging perl-5.23.8 will show assertion failures in the 
Want test suite. It's because PL_comppad/PL_curpad save/restore is now done by 
the context stack / cx_popsub() rather than as previously on the savestack / 
LEAVE.
+
+    > This stops the double_return() 'convert CXt_SUB to CXt_NULL' hack from 
working properly, as PL_comppad is no longer restored when transitioning from 
the inner to outer sub. The attached patch substitutes one evil hack for 
another: it keeps the CXt_SUB context stack entry, but sets its retop field to 
point to the return op again (rather than its caller) so that the return op 
gets called twice (with a bit of markstack hackery to ensure there are two 
marks for the two returns to pop).
+
+    > rreturn and lnoreturn are also a bit under-tested. In particular, there 
are no tests for rreturn in list context. I added such a test, but more need 
adding.
+
+    > I can see this hack breaking again in the future. Perhaps in the long 
term
+    > rreturn() and lnoreturn() should be implemented using custom ops???
+
+    > Dave M.
+
+0.28  Thu 25 Feb 2016 22:02:42 GMT
+    - Fix test failure in 5.14
+    - Fix test failure in 5.23.9 (using a patch from Slaven Rezic)
+      
http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/Want-0.26-RT112226.patch
+
+0.29  Fri 26 Feb 2016 04:42:19 GMT
+    - Restore compatibility with certain older perl versions (5.10 and 5.12)
+
+      It seems that “ATTRS: lvalue” doesn’t work with older perls, but that 
you can
+      forward-declare the method in Perl code with the :lvalue attribute with 
the same
+      effect.
+
+      This version of Want is still broken with perl 5.8, for reasons I 
haven’t investigated.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Want-0.26/MANIFEST new/Want-0.29/MANIFEST
--- old/Want-0.26/MANIFEST      2015-04-28 13:34:14.000000000 +0200
+++ new/Want-0.29/MANIFEST      2007-05-01 22:40:23.000000000 +0200
@@ -15,4 +15,3 @@
 t/threads.p
 t/threads.t
 META.yml                                 Module meta-data (added by MakeMaker)
-META.json                                Module JSON meta-data (added by 
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Want-0.26/META.json new/Want-0.29/META.json
--- old/Want-0.26/META.json     2015-04-28 13:34:14.000000000 +0200
+++ new/Want-0.29/META.json     1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-{
-   "abstract" : "unknown",
-   "author" : [
-      "unknown"
-   ],
-   "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter 
version 2.120921",
-   "license" : [
-      "unknown"
-   ],
-   "meta-spec" : {
-      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
-      "version" : "2"
-   },
-   "name" : "Want",
-   "no_index" : {
-      "directory" : [
-         "t",
-         "inc"
-      ]
-   },
-   "prereqs" : {
-      "build" : {
-         "requires" : {
-            "ExtUtils::MakeMaker" : "0"
-         }
-      },
-      "configure" : {
-         "requires" : {
-            "ExtUtils::MakeMaker" : "0"
-         }
-      },
-      "runtime" : {
-         "requires" : {}
-      }
-   },
-   "release_status" : "stable",
-   "version" : "0.26"
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Want-0.26/META.yml new/Want-0.29/META.yml
--- old/Want-0.26/META.yml      2015-04-28 13:34:14.000000000 +0200
+++ new/Want-0.29/META.yml      2016-02-26 05:42:48.000000000 +0100
@@ -1,21 +1,20 @@
----
-abstract: unknown
-author:
-  - unknown
-build_requires:
-  ExtUtils::MakeMaker: 0
+--- #YAML:1.0
+name:               Want
+version:            0.29
+abstract:           ~
+author:  []
+license:            unknown
+distribution_type:  module
 configure_requires:
-  ExtUtils::MakeMaker: 0
-dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 
2.120921'
-license: unknown
-meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
-name: Want
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:  {}
 no_index:
-  directory:
-    - t
-    - inc
-requires: {}
-version: 0.26
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.56
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Want-0.26/README new/Want-0.29/README
--- old/Want-0.26/README        2015-04-28 13:29:56.000000000 +0200
+++ new/Want-0.29/README        2016-02-26 05:30:25.000000000 +0100
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
-| Want v0.26    - Robin Houston, 2015-04-28
+| Want v0.29    - Robin Houston, 2016-02-26
 -----------------------------------------------------------------------------
 
 For full documentation, see the POD included with the module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Want-0.26/Want.pm new/Want-0.29/Want.pm
--- old/Want-0.26/Want.pm       2015-04-28 13:29:59.000000000 +0200
+++ new/Want-0.29/Want.pm       2016-02-26 05:30:17.000000000 +0100
@@ -12,7 +12,7 @@
 
 our @EXPORT = qw(want rreturn lnoreturn);
 our @EXPORT_OK = qw(howmany wantref);
-our $VERSION = '0.26';
+our $VERSION = '0.29';
 
 bootstrap Want $VERSION;
 
@@ -168,34 +168,40 @@
     }
 }
 
+sub double_return :lvalue;
+
 sub rreturn (@) {
     if (want_lvalue(1)) {
         croak "Can't rreturn in lvalue context";
     }
-    double_return();
 
     # Extra scope needed to work with perl-5.19.7 or greater.
     # Prevents the return being optimised out, which is needed
     # since it's actually going to be used a stack level above
     # this sub.
     {
-        return wantarray ? @_ : $_[$#_];
+        return double_return(@_);
     }
 }
 
-sub lnoreturn () {
+sub lnoreturn () : lvalue {
     if (!want_lvalue(1) || !want_assign(1)) {
         croak "Can't lnoreturn except in ASSIGN context";
     }
-    double_return();
 
     # Extra scope needed to work with perl-5.19.7 or greater.
     # Prevents the return being optimised out, which is needed
     # since it's actually going to be used a stack level above
     # this sub.
-    {
-        return disarm_temp(my $undef);
+    #
+    # But in older versions of perl, adding the extra scope
+    # causes the error:
+    #   Can't modify loop exit in lvalue subroutine return
+    # so we have to check the version.
+    if ($] >= 5.019) {
+        return double_return(disarm_temp(my $undef));
     }
+    return double_return(disarm_temp(my $undef));
 }
 
 # Some naughty people were relying on these internal methods.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Want-0.26/Want.xs new/Want-0.29/Want.xs
--- old/Want-0.26/Want.xs       2015-04-28 13:25:45.000000000 +0200
+++ new/Want-0.29/Want.xs       2016-02-26 05:29:09.000000000 +0100
@@ -172,8 +172,17 @@
             continue;
 #ifdef CXt_LOOP_PLAIN
         case CXt_LOOP_PLAIN:
+#endif
+#ifdef CXt_LOOP_FOR
         case CXt_LOOP_FOR:
-#else
+#endif
+#ifdef CXt_LOOP_LIST
+        case CXt_LOOP_LIST:
+#endif
+#ifdef CXt_LOOP_ARY
+        case CXt_LOOP_ARY:
+#endif
+#ifdef CXt_LOOP
         case CXt_LOOP:
 #endif
             return tcx;
@@ -714,7 +723,7 @@
     PUSHs(r ? sv_2mortal(newRV_noinc((SV*) r)) : &PL_sv_undef);
 
 void
-double_return()
+double_return(...)
   PREINIT:
     PERL_CONTEXT *ourcx, *cx;
   PPCODE:
@@ -722,12 +731,28 @@
     cx    = upcontext(aTHX_ 1);
     if (!cx)
         Perl_croak(aTHX_ "Can't return outside a subroutine");
-
+#ifdef POPBLOCK
     ourcx->cx_type = CXt_NULL;
     CvDEPTH(ourcx->blk_sub.cv)--;
-#if HAS_RETSTACK
+#  if HAS_RETSTACK
     if (PL_retstack_ix > 0)
         --PL_retstack_ix;
+#  endif
+#else
+    /* In 5.23.8 or later, PL_curpad is saved in the context stack and
+     * restored by cx_popsub(), rather than being saved on the savestack
+     * and restored by LEAVE; so just CXt_NULLing the parent sub
+     * skips the PL_curpad restore and so everything done during the
+     * second part of the return will have the wrong PL_curpad.
+     * So instead, fix up the first return so that it thinks the
+     * op to continue at is iteself, forcing it to do a double return.
+     */
+    assert(PL_op->op_next->op_type == OP_RETURN);
+    /* force the op following the 'return' to be 'return' again */
+    ourcx->blk_sub.retop = PL_op->op_next;
+    assert(PL_markstack + ourcx->blk_oldmarksp + 1 == PL_markstack_ptr);
+    ourcx->blk_oldmarksp++;
+    ourcx->blk_gimme = cx->blk_gimme;
 #endif
 
     return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Want-0.26/t/all.t new/Want-0.29/t/all.t
--- old/Want-0.26/t/all.t       2014-12-02 11:22:35.000000000 +0100
+++ new/Want-0.29/t/all.t       2016-02-25 22:24:00.000000000 +0100
@@ -1,4 +1,4 @@
-BEGIN { $| = 1; print "1..70\n"; }
+BEGIN { $| = 1; print "1..72\n"; }
 
 # Test that we can load the module
 END {print "not ok 1\n" unless $loaded;}
@@ -223,3 +223,20 @@
 
 %x    = (a => 1, tCOUNT(69, undef));
 %::x  = (a => 2, tCOUNT(70, undef));
+
+sub try_rreturn : lvalue {
+    rreturn @_;
+    return;
+}
+
+{
+    my $res;
+
+    $res = try_rreturn(qw(a b c));
+    print "not " unless $res eq "c";
+    print "ok 71 # rreturn in scalar context ($res)\n";
+
+    $res = join(':', try_rreturn(qw(a b c)));
+    print "not " unless $res eq "a:b:c";
+    print "ok 72 # rreturn in list context ($res)\n";
+}


Reply via email to