Hello community, here is the log from the commit of package perl-Future for openSUSE:Factory checked in at 2020-10-26 16:18:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Future (Old) and /work/SRC/openSUSE:Factory/.perl-Future.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Future" Mon Oct 26 16:18:57 2020 rev:14 rq:842992 version:0.46 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Future/perl-Future.changes 2020-04-23 18:35:05.068621127 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Future.new.3463/perl-Future.changes 2020-10-26 16:19:41.683098313 +0100 @@ -1,0 +2,15 @@ +Tue Oct 20 03:08:38 UTC 2020 - Tina Müller <timueller+p...@suse.de> + +- updated to 0.46 + see /usr/share/doc/packages/perl-Future/Changes + + 0.46 2020-10-19 + [CHANGES] + * Provide AWAIT_CHAIN_CANCEL named method for compatibility with + upcoming Future::AsyncAwait::Awaitable method rename + + [BUGFIXES] + * Ensure that Future::Mutex returns proper cloned future instances + when waiting (RT133563) + +------------------------------------------------------------------- Old: ---- Future-0.45.tar.gz New: ---- Future-0.46.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Future.spec ++++++ --- /var/tmp/diff_new_pack.wREq67/_old 2020-10-26 16:19:42.291098802 +0100 +++ /var/tmp/diff_new_pack.wREq67/_new 2020-10-26 16:19:42.291098802 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-Future # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,13 +17,13 @@ Name: perl-Future -Version: 0.45 +Version: 0.46 Release: 0 %define cpan_name Future Summary: Represent an operation awaiting completion License: Artistic-1.0 OR GPL-1.0-or-later Group: Development/Libraries/Perl -Url: https://metacpan.org/release/%{cpan_name} +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 BuildArch: noarch ++++++ Future-0.45.tar.gz -> Future-0.46.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/Build.PL new/Future-0.46/Build.PL --- old/Future-0.45/Build.PL 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/Build.PL 2020-10-19 19:28:08.000000000 +0200 @@ -1,3 +1,4 @@ +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/Changes new/Future-0.46/Changes --- old/Future-0.45/Changes 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/Changes 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,14 @@ Revision history for Future +0.46 2020-10-19 + [CHANGES] + * Provide AWAIT_CHAIN_CANCEL named method for compatibility with + upcoming Future::AsyncAwait::Awaitable method rename + + [BUGFIXES] + * Ensure that Future::Mutex returns proper cloned future instances + when waiting (RT133563) + 0.45 2020-04-22 [CHANGES] * API changes to make duck-typing closer to Promises/A+ et.al: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/META.json new/Future-0.46/META.json --- old/Future-0.45/META.json 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/META.json 2020-10-19 19:28:08.000000000 +0200 @@ -4,7 +4,7 @@ "Paul Evans <leon...@leonerd.org.uk>" ], "dynamic_config" : 1, - "generated_by" : "Module::Build version 0.4224", + "generated_by" : "Module::Build version 0.4231", "license" : [ "perl_5" ], @@ -39,31 +39,31 @@ "provides" : { "Future" : { "file" : "lib/Future.pm", - "version" : "0.45" + "version" : "0.46" }, "Future::Exception" : { "file" : "lib/Future/Exception.pm", - "version" : "0.45" + "version" : "0.46" }, "Future::Mutex" : { "file" : "lib/Future/Mutex.pm", - "version" : "0.45" + "version" : "0.46" }, "Future::Queue" : { "file" : "lib/Future/Queue.pm", - "version" : "0.45" + "version" : "0.46" }, "Future::Utils" : { "file" : "lib/Future/Utils.pm", - "version" : "0.45" + "version" : "0.46" }, "Test::Future" : { "file" : "lib/Test/Future.pm", - "version" : "0.45" + "version" : "0.46" }, "Test::Future::Deferred" : { "file" : "lib/Test/Future/Deferred.pm", - "version" : "0.45" + "version" : "0.46" } }, "release_status" : "stable", @@ -73,6 +73,6 @@ ], "x_IRC" : "irc://irc.perl.org/#io-async" }, - "version" : "0.45", - "x_serialization_backend" : "JSON::PP version 4.04" + "version" : "0.46", + "x_serialization_backend" : "JSON::PP version 4.05" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/META.yml new/Future-0.46/META.yml --- old/Future-0.45/META.yml 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/META.yml 2020-10-19 19:28:08.000000000 +0200 @@ -10,7 +10,7 @@ configure_requires: Module::Build: '0.4004' dynamic_config: 1 -generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 2.150010' +generated_by: 'Module::Build version 0.4231, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -19,25 +19,25 @@ provides: Future: file: lib/Future.pm - version: '0.45' + version: '0.46' Future::Exception: file: lib/Future/Exception.pm - version: '0.45' + version: '0.46' Future::Mutex: file: lib/Future/Mutex.pm - version: '0.45' + version: '0.46' Future::Queue: file: lib/Future/Queue.pm - version: '0.45' + version: '0.46' Future::Utils: file: lib/Future/Utils.pm - version: '0.45' + version: '0.46' Test::Future: file: lib/Test/Future.pm - version: '0.45' + version: '0.46' Test::Future::Deferred: file: lib/Test/Future/Deferred.pm - version: '0.45' + version: '0.46' requires: Carp: '1.25' Test::Builder::Module: '0' @@ -46,5 +46,5 @@ resources: IRC: irc://irc.perl.org/#io-async license: http://dev.perl.org/licenses/ -version: '0.45' +version: '0.46' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/lib/Future/Exception.pm new/Future-0.46/lib/Future/Exception.pm --- old/Future-0.45/lib/Future/Exception.pm 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/lib/Future/Exception.pm 2020-10-19 19:28:08.000000000 +0200 @@ -5,10 +5,11 @@ package Future::Exception; +use v5.10; use strict; use warnings; -our $VERSION = '0.45'; +our $VERSION = '0.46'; =head1 NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/lib/Future/Mutex.pm new/Future-0.46/lib/Future/Mutex.pm --- old/Future-0.45/lib/Future/Mutex.pm 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/lib/Future/Mutex.pm 2020-10-19 19:28:08.000000000 +0200 @@ -1,18 +1,20 @@ # You may distribute under the terms of either the GNU General Public License # or the Artistic License (the same terms as Perl itself) # -# (C) Paul Evans, 2016-2017 -- leon...@leonerd.org.uk +# (C) Paul Evans, 2016-2020 -- leon...@leonerd.org.uk package Future::Mutex; +use v5.10; use strict; use warnings; -use 5.010; -our $VERSION = '0.45'; +our $VERSION = '0.46'; use Future; +use Scalar::Util qw( weaken ); + =head1 NAME C<Future::Mutex> - mutual exclusion lock around code that returns L<Future>s @@ -91,6 +93,7 @@ return bless { avail => $params{count} // 1, + waitf => undef, queue => [], }, $class; } @@ -125,7 +128,8 @@ $down_f = Future->done; } else { - push @{ $self->{queue} }, $down_f = Future->new; + die "ARGH Need to clone an existing future\n" unless defined $self->{waitf}; + push @{ $self->{queue} }, $down_f = $self->{waitf}->new; } my $up = sub { @@ -134,10 +138,13 @@ } else { $self->{avail}++; + undef $self->{waitf}; } }; - $down_f->then( $code )->on_ready( $up ); + my $retf = $down_f->then( $code )->on_ready( $up ); + $self->{waitf} or weaken( $self->{waitf} = $retf ); + return $retf; } =head2 available diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/lib/Future/Queue.pm new/Future-0.46/lib/Future/Queue.pm --- old/Future-0.45/lib/Future/Queue.pm 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/lib/Future/Queue.pm 2020-10-19 19:28:08.000000000 +0200 @@ -5,10 +5,11 @@ package Future::Queue; +use v5.10; use strict; use warnings; -our $VERSION = '0.45'; +our $VERSION = '0.46'; =head1 NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/lib/Future/Utils.pm new/Future-0.46/lib/Future/Utils.pm --- old/Future-0.45/lib/Future/Utils.pm 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/lib/Future/Utils.pm 2020-10-19 19:28:08.000000000 +0200 @@ -5,10 +5,11 @@ package Future::Utils; +use v5.10; use strict; use warnings; -our $VERSION = '0.45'; +our $VERSION = '0.46'; use Exporter 'import'; # Can't import the one from Exporter as it relies on package inheritance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/lib/Future.pm new/Future-0.46/lib/Future.pm --- old/Future-0.45/lib/Future.pm 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/lib/Future.pm 2020-10-19 19:28:08.000000000 +0200 @@ -5,11 +5,12 @@ package Future; +use v5.10; use strict; use warnings; no warnings 'recursion'; # Disable the "deep recursion" warning -our $VERSION = '0.45'; +our $VERSION = '0.46'; use Carp qw(); # don't import croak use Scalar::Util qw( weaken blessed reftype ); @@ -781,6 +782,9 @@ weaken( $r->[1] ); } +# New name for it +*AWAIT_CHAIN_CANCEL = \&AWAIT_ON_CANCEL; + sub _revoke_on_cancel { my $self = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/lib/Test/Future/Deferred.pm new/Future-0.46/lib/Test/Future/Deferred.pm --- old/Future-0.45/lib/Test/Future/Deferred.pm 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/lib/Test/Future/Deferred.pm 2020-10-19 19:28:08.000000000 +0200 @@ -5,11 +5,12 @@ package Test::Future::Deferred; +use v5.10; use strict; use warnings; use base qw( Future ); -our $VERSION = '0.45'; +our $VERSION = '0.46'; =head1 NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/lib/Test/Future.pm new/Future-0.46/lib/Test/Future.pm --- old/Future-0.45/lib/Test/Future.pm 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/lib/Test/Future.pm 2020-10-19 19:28:08.000000000 +0200 @@ -5,11 +5,12 @@ package Test::Future; +use v5.10; use strict; use warnings; use base qw( Test::Builder::Module ); -our $VERSION = '0.45'; +our $VERSION = '0.46'; our @EXPORT = qw( no_pending_futures diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/00use.t new/Future-0.46/t/00use.t --- old/Future-0.45/t/00use.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/00use.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/01future.t new/Future-0.46/t/01future.t --- old/Future-0.45/t/01future.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/01future.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/02cancel.t new/Future-0.46/t/02cancel.t --- old/Future-0.45/t/02cancel.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/02cancel.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/03then.t new/Future-0.46/t/03then.t --- old/Future-0.45/t/03then.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/03then.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/04else.t new/Future-0.46/t/04else.t --- old/Future-0.45/t/04else.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/04else.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/05then-else.t new/Future-0.46/t/05then-else.t --- old/Future-0.45/t/05then-else.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/05then-else.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/06followed_by.t new/Future-0.46/t/06followed_by.t --- old/Future-0.45/t/06followed_by.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/06followed_by.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/07catch.t new/Future-0.46/t/07catch.t --- old/Future-0.45/t/07catch.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/07catch.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/09transform.t new/Future-0.46/t/09transform.t --- old/Future-0.45/t/09transform.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/09transform.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/10wait_all.t new/Future-0.46/t/10wait_all.t --- old/Future-0.45/t/10wait_all.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/10wait_all.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/11wait_any.t new/Future-0.46/t/11wait_any.t --- old/Future-0.45/t/11wait_any.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/11wait_any.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/12needs_all.t new/Future-0.46/t/12needs_all.t --- old/Future-0.45/t/12needs_all.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/12needs_all.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/13needs_any.t new/Future-0.46/t/13needs_any.t --- old/Future-0.45/t/13needs_any.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/13needs_any.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/20subclass.t new/Future-0.46/t/20subclass.t --- old/Future-0.45/t/20subclass.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/20subclass.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/21debug.t new/Future-0.46/t/21debug.t --- old/Future-0.45/t/21debug.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/21debug.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/22wrap_cb.t new/Future-0.46/t/22wrap_cb.t --- old/Future-0.45/t/22wrap_cb.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/22wrap_cb.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/23exception.t new/Future-0.46/t/23exception.t --- old/Future-0.45/t/23exception.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/23exception.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/30utils-call.t new/Future-0.46/t/30utils-call.t --- old/Future-0.45/t/30utils-call.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/30utils-call.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/31utils-call-with-escape.t new/Future-0.46/t/31utils-call-with-escape.t --- old/Future-0.45/t/31utils-call-with-escape.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/31utils-call-with-escape.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/32utils-repeat.t new/Future-0.46/t/32utils-repeat.t --- old/Future-0.45/t/32utils-repeat.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/32utils-repeat.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/33utils-repeat-generate.t new/Future-0.46/t/33utils-repeat-generate.t --- old/Future-0.45/t/33utils-repeat-generate.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/33utils-repeat-generate.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/34utils-repeat-foreach.t new/Future-0.46/t/34utils-repeat-foreach.t --- old/Future-0.45/t/34utils-repeat-foreach.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/34utils-repeat-foreach.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/35utils-map-void.t new/Future-0.46/t/35utils-map-void.t --- old/Future-0.45/t/35utils-map-void.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/35utils-map-void.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/36utils-map.t new/Future-0.46/t/36utils-map.t --- old/Future-0.45/t/36utils-map.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/36utils-map.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/40mutex.t new/Future-0.46/t/40mutex.t --- old/Future-0.45/t/40mutex.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/40mutex.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,9 +1,11 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; use Test::More; +use Test::Refcount; use Future; use Future::Mutex; @@ -15,11 +17,13 @@ ok( $mutex->available, 'Mutex is available' ); my $f; - my $lf = $mutex->enter( sub { $f = Future->new } ); + my $lf = $mutex->enter( sub { $f = t::Future::Subclass->new } ); ok( defined $lf, '->enter returns Future' ); ok( defined $f, '->enter on new Mutex runs code' ); + isa_ok( $lf, "t::Future::Subclass", '$lf' ); + ok( !$mutex->available, 'Mutex is unavailable' ); ok( !$lf->is_ready, 'locked future not yet ready' ); @@ -27,6 +31,9 @@ $f->done; ok( $lf->is_ready, 'locked future ready after $f->done' ); ok( $mutex->available, 'Mutex is available again' ); + + undef $f; + is_oneref( $lf, '$lf has one ref at EOT' ); } # done chaining @@ -34,10 +41,15 @@ my $mutex = Future::Mutex->new; my $f1; - my $lf1 = $mutex->enter( sub { $f1 = Future->new } ); + my $lf1 = $mutex->enter( sub { $f1 = t::Future::Subclass->new } ); my $f2; - my $lf2 = $mutex->enter( sub { $f2 = Future->new } ); + my $lf2 = $mutex->enter( sub { $f2 = t::Future::Subclass->new } ); + + isa_ok( $lf1, "t::Future::Subclass", '$lf1' ); + isa_ok( $lf2, "t::Future::Subclass", '$lf2' ); + + is_oneref( $lf2, '$lf2 has one ref' ); ok( !defined $f2, 'second enter not invoked while locked' ); @@ -47,6 +59,12 @@ $f2->done; ok( $lf2->is_ready, 'second locked future ready after $f2->done' ); ok( $mutex->available, 'Mutex is available again' ); + + undef $f1; + undef $f2; + + is_oneref( $lf1, '$lf1 has one ref at EOT' ); + is_oneref( $lf2, '$lf2 has one ref at EOT' ); } # fail chaining @@ -119,11 +137,13 @@ my ( $f1, $f2, $f3 ); my $f = Future->needs_all( - $mutex->enter( sub { $f1 = Future->new } ), - $mutex->enter( sub { $f2 = Future->new } ), - $mutex->enter( sub { $f3 = Future->new } ), + $mutex->enter( sub { $f1 = t::Future::Subclass->new } ), + $mutex->enter( sub { $f2 = t::Future::Subclass->new } ), + $mutex->enter( sub { $f3 = t::Future::Subclass->new } ), ); + isa_ok( $f, "t::Future::Subclass", '$f' ); + ok( defined $f1, '$f1 defined' ); $f1->done; @@ -163,3 +183,6 @@ } done_testing; + +package t::Future::Subclass; +use base qw( Future ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/41queue.t new/Future-0.46/t/41queue.t --- old/Future-0.45/t/41queue.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/41queue.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/50test-future.t new/Future-0.46/t/50test-future.t --- old/Future-0.45/t/50test-future.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/50test-future.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/51test-future-deferred.t new/Future-0.46/t/51test-future-deferred.t --- old/Future-0.45/t/51test-future-deferred.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/51test-future-deferred.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/52awaitable-future.t new/Future-0.46/t/52awaitable-future.t --- old/Future-0.45/t/52awaitable-future.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/52awaitable-future.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.45/t/99pod.t new/Future-0.46/t/99pod.t --- old/Future-0.45/t/99pod.t 2020-04-22 16:05:34.000000000 +0200 +++ new/Future-0.46/t/99pod.t 2020-10-19 19:28:08.000000000 +0200 @@ -1,5 +1,6 @@ #!/usr/bin/perl +use v5.10; use strict; use warnings;