Hello community,
here is the log from the commit of package perl-Syntax-Keyword-Try for
openSUSE:Factory checked in at 2020-08-04 20:18:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Syntax-Keyword-Try (Old)
and /work/SRC/openSUSE:Factory/.perl-Syntax-Keyword-Try.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Syntax-Keyword-Try"
Tue Aug 4 20:18:50 2020 rev:7 rq:824120 version:0.18
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Syntax-Keyword-Try/perl-Syntax-Keyword-Try.changes
2020-07-29 17:23:49.284731858 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Syntax-Keyword-Try.new.3592/perl-Syntax-Keyword-Try.changes
2020-08-04 20:19:11.508951229 +0200
@@ -1,0 +2,19 @@
+Sun Aug 2 03:12:52 UTC 2020 - Tina Müller <[email protected]>
+
+- updated to 0.18
+ see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes
+
+ 0.18 2020-08-01
+ [CHANGES]
+ * De-experiment the `catch ($var)` syntax
+
+ 0.17 2020-07-31
+ [CHANGES]
+ * Ensure that `catch ($var)` does not retain exception value after
+ block exit
+ * Docs fixes for clarity on experimental status of `catch ($var)`
+
+ [BUGFIXES]
+ * Ensure sv_isa_sv is a macro for aTHX on threaded perls
+
+-------------------------------------------------------------------
Old:
----
Syntax-Keyword-Try-0.16.tar.gz
New:
----
Syntax-Keyword-Try-0.18.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Syntax-Keyword-Try.spec ++++++
--- /var/tmp/diff_new_pack.2aIiMb/_old 2020-08-04 20:19:13.896952308 +0200
+++ /var/tmp/diff_new_pack.2aIiMb/_new 2020-08-04 20:19:13.904952312 +0200
@@ -17,7 +17,7 @@
Name: perl-Syntax-Keyword-Try
-Version: 0.16
+Version: 0.18
Release: 0
%define cpan_name Syntax-Keyword-Try
Summary: C<try/catch/finally> syntax for perl
++++++ Syntax-Keyword-Try-0.16.tar.gz -> Syntax-Keyword-Try-0.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.16/Changes
new/Syntax-Keyword-Try-0.18/Changes
--- old/Syntax-Keyword-Try-0.16/Changes 2020-07-24 00:57:11.000000000 +0200
+++ new/Syntax-Keyword-Try-0.18/Changes 2020-08-01 18:18:13.000000000 +0200
@@ -1,5 +1,18 @@
Revision history for Syntax-Keyword-Try
+0.18 2020-08-01
+ [CHANGES]
+ * De-experiment the `catch ($var)` syntax
+
+0.17 2020-07-31
+ [CHANGES]
+ * Ensure that `catch ($var)` does not retain exception value after
+ block exit
+ * Docs fixes for clarity on experimental status of `catch ($var)`
+
+ [BUGFIXES]
+ * Ensure sv_isa_sv is a macro for aTHX on threaded perls
+
0.16 2020-07-23
[CHANGES]
* Provide the `:experimental` import tag as a nicer way to silence
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.16/META.json
new/Syntax-Keyword-Try-0.18/META.json
--- old/Syntax-Keyword-Try-0.16/META.json 2020-07-24 00:57:11.000000000
+0200
+++ new/Syntax-Keyword-Try-0.18/META.json 2020-08-01 18:18:13.000000000
+0200
@@ -4,7 +4,7 @@
"Paul Evans <[email protected]>"
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.4224",
+ "generated_by" : "Module::Build version 0.4231",
"license" : [
"perl_5"
],
@@ -38,7 +38,7 @@
"provides" : {
"Syntax::Keyword::Try" : {
"file" : "lib/Syntax/Keyword/Try.pm",
- "version" : "0.16"
+ "version" : "0.18"
}
},
"release_status" : "stable",
@@ -48,6 +48,6 @@
],
"x_IRC" : "irc://irc.perl.org/#io-async"
},
- "version" : "0.16",
- "x_serialization_backend" : "JSON::PP version 4.04"
+ "version" : "0.18",
+ "x_serialization_backend" : "JSON::PP version 4.05"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.16/META.yml
new/Syntax-Keyword-Try-0.18/META.yml
--- old/Syntax-Keyword-Try-0.16/META.yml 2020-07-24 00:57:11.000000000
+0200
+++ new/Syntax-Keyword-Try-0.18/META.yml 2020-08-01 18:18:13.000000000
+0200
@@ -8,7 +8,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
@@ -17,11 +17,11 @@
provides:
Syntax::Keyword::Try:
file: lib/Syntax/Keyword/Try.pm
- version: '0.16'
+ version: '0.18'
requires:
perl: '5.014'
resources:
IRC: irc://irc.perl.org/#io-async
license: http://dev.perl.org/licenses/
-version: '0.16'
+version: '0.18'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.16/README
new/Syntax-Keyword-Try-0.18/README
--- old/Syntax-Keyword-Try-0.16/README 2020-07-24 00:57:11.000000000 +0200
+++ new/Syntax-Keyword-Try-0.18/README 2020-08-01 18:18:13.000000000 +0200
@@ -6,22 +6,6 @@
use Syntax::Keyword::Try;
- sub foo
- {
- try {
- attempt_a_thing();
- return "success";
- }
- catch {
- warn "It failed - $@";
- return "failure";
- }
- }
-
- Or, to use the experimental syntax:
-
- use Syntax::Keyword::Try qw( try :experimental )
-
sub foo {
try {
attempt_a_thing();
@@ -57,8 +41,6 @@
the import line for this module to only silence this module's warnings
selectively:
- use Syntax::Keyword::Try qw( try :experimental(var) );
-
use Syntax::Keyword::Try qw( try :experimental(typed) );
use Syntax::Keyword::Try qw( try :experimental ); # all of the above
@@ -109,28 +91,22 @@
catch
...
- catch {
+ catch ($var) {
STATEMENTS...
}
- Or
+ or
...
- catch ($var) {
+ catch {
STATEMENTS...
}
- Experimental; since version 0.14.
-
A catch statement provides a block of code to the preceding try
statement that will be invoked in the case that the main block of code
- throws an exception. The catch block can inspect the raised exception
- by looking in $@ in the usual way. Optionally, a new lexical variable
- can be introduced to store the exception in. This new form is
- experimental and is likely to be expanded on in a future version, as
- part of the wider attempt to introduce typed dispatch. Using it will
- provoke an experimental category warning on supporting perl versions,
- unless silenced by importing the :experimental(var) tag (see above).
+ throws an exception. Optionally a new lexical variable can be provided
+ to store the exception in. If not provided, the catch block can inspect
+ the raised exception by looking in $@ instead.
Presence of this catch statement causes any exception thrown by the
preceding try block to be non-fatal to the surrounding code. If the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.16/lib/Syntax/Keyword/Try.pm
new/Syntax-Keyword-Try-0.18/lib/Syntax/Keyword/Try.pm
--- old/Syntax-Keyword-Try-0.16/lib/Syntax/Keyword/Try.pm 2020-07-24
00:57:11.000000000 +0200
+++ new/Syntax-Keyword-Try-0.18/lib/Syntax/Keyword/Try.pm 2020-08-01
18:18:13.000000000 +0200
@@ -3,7 +3,7 @@
#
# (C) Paul Evans, 2016-2019 -- [email protected]
-package Syntax::Keyword::Try 0.16;
+package Syntax::Keyword::Try 0.18;
use v5.14;
use warnings;
@@ -21,22 +21,6 @@
use Syntax::Keyword::Try;
- sub foo
- {
- try {
- attempt_a_thing();
- return "success";
- }
- catch {
- warn "It failed - $@";
- return "failure";
- }
- }
-
-Or, to use the experimental syntax:
-
- use Syntax::Keyword::Try qw( try :experimental )
-
sub foo {
try {
attempt_a_thing();
@@ -70,8 +54,6 @@
a more fine-grained approach you can instead use the import line for this
module to only silence this module's warnings selectively:
- use Syntax::Keyword::Try qw( try :experimental(var) );
-
use Syntax::Keyword::Try qw( try :experimental(typed) );
use Syntax::Keyword::Try qw( try :experimental ); # all of the above
@@ -122,28 +104,22 @@
=head2 catch
...
- catch {
+ catch ($var) {
STATEMENTS...
}
-Or
+or
...
- catch ($var) {
+ catch {
STATEMENTS...
}
-I<Experimental; since version 0.14.>
-
A C<catch> statement provides a block of code to the preceding C<try>
statement that will be invoked in the case that the main block of code throws
-an exception. The C<catch> block can inspect the raised exception by looking
-in C<$@> in the usual way. Optionally, a new lexical variable can be
-introduced to store the exception in. This new form is experimental and is
-likely to be expanded on in a future version, as part of the wider attempt to
-introduce typed dispatch. Using it will provoke an C<experimental> category
-warning on supporting perl versions, unless silenced by importing the
-C<:experimental(var)> tag (see above).
+an exception. Optionally a new lexical variable can be provided to store the
+exception in. If not provided, the C<catch> block can inspect the raised
+exception by looking in C<$@> instead.
Presence of this C<catch> statement causes any exception thrown by the
preceding C<try> block to be non-fatal to the surrounding code. If the
@@ -399,7 +375,7 @@
$class->import_into( $caller, @_ );
}
-my @EXPERIMENTAL = qw( var typed );
+my @EXPERIMENTAL = qw( typed );
sub import_into
{
@@ -412,6 +388,11 @@
$^H{"Syntax::Keyword::Try/try"}++ if delete $syms{try};
$^H{"Syntax::Keyword::Try/try_value"}++ if delete $syms{try_value};
+ $^H{"Syntax::Keyword::Try/no_finally"}++ if delete $syms{no_finally};
+
+ # stablised experiments
+ delete $syms{":experimental($_)"} for qw( var );
+
foreach ( @EXPERIMENTAL ) {
$^H{"Syntax::Keyword::Try/experimental($_)"}++ if delete
$syms{":experimental($_)"};
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.16/lib/Syntax/Keyword/Try.xs
new/Syntax-Keyword-Try-0.18/lib/Syntax/Keyword/Try.xs
--- old/Syntax-Keyword-Try-0.16/lib/Syntax/Keyword/Try.xs 2020-07-24
00:57:11.000000000 +0200
+++ new/Syntax-Keyword-Try-0.18/lib/Syntax/Keyword/Try.xs 2020-08-01
18:18:13.000000000 +0200
@@ -421,7 +421,8 @@
static XOP xop_isa;
/* Totally stolen from perl 5.32.0's pp.c */
-static bool sv_isa_sv(SV *sv, SV *namesv)
+#define sv_isa_sv(sv, namesv) S_sv_isa_sv(aTHX_ sv, namesv)
+static bool S_sv_isa_sv(pTHX_ SV *sv, SV *namesv)
{
if(!SvROK(sv) || !SvOBJECT(SvRV(sv)))
return FALSE;
@@ -492,19 +493,12 @@
PADOFFSET catchvar = 0;
bool warned = FALSE;
-#ifdef WARN_EXPERIMENTAL
- if(!hints || !hv_fetchs(hints, "Syntax::Keyword::Try/experimental(var)",
0)) {
- warned = true;
- Perl_ck_warner(aTHX_ packWARN(WARN_EXPERIMENTAL),
- "'catch (VAR)' syntax is experimental and may be changed or removed
without notice");
- }
-#endif
lex_read_space(0);
catchvar = parse_lexvar();
- /* $var = $@ */
+ /* my $var = $@ */
assignop = newBINOP(OP_SASSIGN, 0,
- newGVOP(OP_GVSV, 0, PL_errgv), newPADxVOP(OP_PADSV, catchvar, 0, 0));
+ newGVOP(OP_GVSV, 0, PL_errgv), newPADxVOP(OP_PADSV, catchvar, OPf_MOD,
OPpLVAL_INTRO));
lex_read_space(0);
if(lex_consume("isa")) {
@@ -594,7 +588,8 @@
SvREFCNT_dec(condcatch);
}
- if(lex_consume("finally")) {
+ if(!hv_fetchs(hints, "Syntax::Keyword::Try/no_finally", 0) &&
+ lex_consume("finally")) {
I32 floor_ix, save_ix;
OP *body;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.16/t/01trycatch.t
new/Syntax-Keyword-Try-0.18/t/01trycatch.t
--- old/Syntax-Keyword-Try-0.16/t/01trycatch.t 2020-07-24 00:57:11.000000000
+0200
+++ new/Syntax-Keyword-Try-0.18/t/01trycatch.t 2020-08-01 18:18:13.000000000
+0200
@@ -96,8 +96,6 @@
# catch into new lexical
{
- use Syntax::Keyword::Try ':experimental(var)';
-
try {
die "caught\n";
}
@@ -106,4 +104,19 @@
}
}
+# catch into lexical does not retain
+{
+ my $destroyed;
+ sub Canary::DESTROY { $destroyed++ }
+
+ try {
+ die bless [], "Canary";
+ }
+ catch ( $e ) {
+ # don't touch $e
+ }
+
+ ok( $destroyed, 'catch ($var) does not retain value' );
+}
+
done_testing;