Hello community, here is the log from the commit of package perl-Future for openSUSE:Factory checked in at 2019-06-14 20:42:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Future (Old) and /work/SRC/openSUSE:Factory/.perl-Future.new.4811 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Future" Fri Jun 14 20:42:49 2019 rev:9 rq:709925 version:0.41 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Future/perl-Future.changes 2019-05-06 13:27:28.101285835 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Future.new.4811/perl-Future.changes 2019-06-14 20:42:49.846349062 +0200 @@ -1,0 +2,10 @@ +Fri Jun 14 05:08:11 UTC 2019 - Stephan Kulow <[email protected]> + +- updated to 0.41 + see /usr/share/doc/packages/perl-Future/Changes + + 0.41 2019-06-13 + [CHANGES] + * Added Future::Exception->throw + +------------------------------------------------------------------- Old: ---- Future-0.40.tar.gz New: ---- Future-0.41.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Future.spec ++++++ --- /var/tmp/diff_new_pack.cFIDIO/_old 2019-06-14 20:42:50.358348193 +0200 +++ /var/tmp/diff_new_pack.cFIDIO/_new 2019-06-14 20:42:50.358348193 +0200 @@ -17,7 +17,7 @@ Name: perl-Future -Version: 0.40 +Version: 0.41 Release: 0 %define cpan_name Future Summary: Represent an operation awaiting completion ++++++ Future-0.40.tar.gz -> Future-0.41.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.40/Changes new/Future-0.41/Changes --- old/Future-0.40/Changes 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/Changes 2019-06-13 15:42:46.000000000 +0200 @@ -1,5 +1,9 @@ Revision history for Future +0.41 2019-06-13 + [CHANGES] + * Added Future::Exception->throw + 0.40 2019-05-03 [CHANGES] * Added Future::Exception (RT129373) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.40/META.json new/Future-0.41/META.json --- old/Future-0.40/META.json 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/META.json 2019-06-13 15:42:46.000000000 +0200 @@ -39,27 +39,27 @@ "provides" : { "Future" : { "file" : "lib/Future.pm", - "version" : "0.40" + "version" : "0.41" }, "Future::Exception" : { "file" : "lib/Future/Exception.pm", - "version" : "0.40" + "version" : "0.41" }, "Future::Mutex" : { "file" : "lib/Future/Mutex.pm", - "version" : "0.40" + "version" : "0.41" }, "Future::Utils" : { "file" : "lib/Future/Utils.pm", - "version" : "0.40" + "version" : "0.41" }, "Test::Future" : { "file" : "lib/Test/Future.pm", - "version" : "0.40" + "version" : "0.41" }, "Test::Future::Deferred" : { "file" : "lib/Test/Future/Deferred.pm", - "version" : "0.40" + "version" : "0.41" } }, "release_status" : "stable", @@ -69,6 +69,6 @@ ], "x_IRC" : "irc://irc.perl.org/#io-async" }, - "version" : "0.40", + "version" : "0.41", "x_serialization_backend" : "JSON::PP version 4.00" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.40/META.yml new/Future-0.41/META.yml --- old/Future-0.40/META.yml 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/META.yml 2019-06-13 15:42:46.000000000 +0200 @@ -19,22 +19,22 @@ provides: Future: file: lib/Future.pm - version: '0.40' + version: '0.41' Future::Exception: file: lib/Future/Exception.pm - version: '0.40' + version: '0.41' Future::Mutex: file: lib/Future/Mutex.pm - version: '0.40' + version: '0.41' Future::Utils: file: lib/Future/Utils.pm - version: '0.40' + version: '0.41' Test::Future: file: lib/Test/Future.pm - version: '0.40' + version: '0.41' Test::Future::Deferred: file: lib/Test/Future/Deferred.pm - version: '0.40' + version: '0.41' requires: Carp: '1.25' Test::Builder::Module: '0' @@ -43,5 +43,5 @@ resources: IRC: irc://irc.perl.org/#io-async license: http://dev.perl.org/licenses/ -version: '0.40' +version: '0.41' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.40/lib/Future/Exception.pm new/Future-0.41/lib/Future/Exception.pm --- old/Future-0.40/lib/Future/Exception.pm 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/lib/Future/Exception.pm 2019-06-13 15:42:46.000000000 +0200 @@ -8,7 +8,7 @@ use strict; use warnings; -our $VERSION = '0.40'; +our $VERSION = '0.41'; =head1 NAME @@ -88,6 +88,32 @@ =cut +=head2 throw + + Future::Exception->throw( $message, $category, @details ) + +I<Since version 0.41.> + +Constructs a new exception object and throws it using C<die()>. This method +will not return, as it raises the exception directly. + +If C<$message> does not end in a linefeed then the calling file and line +number are appended to it, in the same way C<die()> does. + +=cut + +sub throw +{ + my $class = shift; + my ( $message, $category, @details ) = @_; + $message =~ m/\n$/ or + $message .= sprintf " at %s line %d.\n", ( caller )[1,2]; + die $class->new( $message, $category, @details ); +} + +# TODO: consider a 'croak' method that uses Carp::shortmess to find a suitable +# file/linenumber + =head2 as_future $f = $e->as_future diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.40/lib/Future/Mutex.pm new/Future-0.41/lib/Future/Mutex.pm --- old/Future-0.40/lib/Future/Mutex.pm 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/lib/Future/Mutex.pm 2019-06-13 15:42:46.000000000 +0200 @@ -9,7 +9,7 @@ use warnings; use 5.010; -our $VERSION = '0.40'; +our $VERSION = '0.41'; use Future; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.40/lib/Future/Utils.pm new/Future-0.41/lib/Future/Utils.pm --- old/Future-0.40/lib/Future/Utils.pm 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/lib/Future/Utils.pm 2019-06-13 15:42:46.000000000 +0200 @@ -8,7 +8,7 @@ use strict; use warnings; -our $VERSION = '0.40'; +our $VERSION = '0.41'; 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.40/lib/Future.pm new/Future-0.41/lib/Future.pm --- old/Future-0.40/lib/Future.pm 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/lib/Future.pm 2019-06-13 15:42:46.000000000 +0200 @@ -9,7 +9,7 @@ use warnings; no warnings 'recursion'; # Disable the "deep recursion" warning -our $VERSION = '0.40'; +our $VERSION = '0.41'; use Carp qw(); # don't import croak use Scalar::Util qw( weaken blessed reftype ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.40/lib/Test/Future/Deferred.pm new/Future-0.41/lib/Test/Future/Deferred.pm --- old/Future-0.40/lib/Test/Future/Deferred.pm 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/lib/Test/Future/Deferred.pm 2019-06-13 15:42:46.000000000 +0200 @@ -9,7 +9,7 @@ use warnings; use base qw( Future ); -our $VERSION = '0.40'; +our $VERSION = '0.41'; =head1 NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.40/lib/Test/Future.pm new/Future-0.41/lib/Test/Future.pm --- old/Future-0.40/lib/Test/Future.pm 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/lib/Test/Future.pm 2019-06-13 15:42:46.000000000 +0200 @@ -9,7 +9,7 @@ use warnings; use base qw( Test::Builder::Module ); -our $VERSION = '0.40'; +our $VERSION = '0.41'; our @EXPORT = qw( no_pending_futures diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Future-0.40/t/23exception.t new/Future-0.41/t/23exception.t --- old/Future-0.40/t/23exception.t 2019-05-03 13:32:11.000000000 +0200 +++ new/Future-0.41/t/23exception.t 2019-06-13 15:42:46.000000000 +0200 @@ -50,4 +50,16 @@ '->failure from Future->call on rethrown failure' ); } +# Future::Exception->throw +{ + my $e = exception { Future::Exception->throw( "message\n", category => qw( g h ) ) }; + + is( $e->message, "message\n", '$e->message from F::E->throw' ); + is( $e->category, "category", '$e->category from F::E->throw' ); + is_deeply( [ $e->details ], [qw( g h )], '$e->details from F::E->throw' ); + + $e = exception { Future::Exception->throw( "short", category => ) }; + like( $e->message, qr/^short at \S+ line \d+\.$/, 'F::E->throw appends file/line' ); +} + done_testing;
