# # spec file for package perl-Syntax-Keyword-Try # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Syntax-Keyword-Try Name: perl-Syntax-Keyword-Try Version: 0.290.0 Release: 1.4 %define cpan_version 0.29 Provides: perl(Syntax::Keyword::Try) = 0.290.0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Try/catch/finally syntax for perl URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(Module::Build) >= 0.400400 BuildRequires: perl(Test2::V0) BuildRequires: perl(XS::Parse::Keyword) >= 0.06 BuildRequires: perl(XS::Parse::Keyword::Builder) >= 0.06 Requires: perl(XS::Parse::Keyword) >= 0.06 Provides: perl(Syntax::Keyword::Try::Deparse) = 0.290.0 %define __perllib_provides /bin/true %{perl_requires} %description This module provides a syntax plugin that implements exception-handling semantics in a form familiar to users of other languages, being built on a block labeled with the 'try' keyword, followed by at least one of a 'catch' or 'finally' block. As well as providing a handy syntax for this useful behaviour, this module also serves to contain a number of code examples for how to implement parser plugins and manipulate optrees to provide new syntax and behaviours for perl code. Syntax similar to this module has now been added to core perl, starting at version 5.34.0. If you are writing new code, it is suggested that you instead use the Feature::Compat::Try module instead, as that will enable the core feature on those supported perl versions, falling back to 'Syntax::Keyword::Try' on older perls. %prep %autosetup -n %{cpan_name}-%{cpan_version} %build perl Build.PL --installdirs=vendor optimize="%{optflags}" ./Build build --flags=%{?_smp_mflags} %check ./Build test %install ./Build install --destdir=%{buildroot} --create_packlist=0 %perl_gen_filelist %files -f %{name}.files %doc Changes README %license LICENSE %changelog * Fri Jul 14 2023 Tina Müller - updated to 0.29 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.29 2023-07-13 [CHANGES] * Updates to compile cleanly on perl v5.38 * Remember to implement `no Syntax::Keyword::Try` to disable the syntax * Swap all the unit tests to `Test2::V0` * Fri Dec 9 2022 Tina Müller - updated to 0.28 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.28 2022-12-08 [CHANGES] * Account for the new structure of ->cop_warnings in perl v5.37.6 * Updated to latest hax/ support files; accounting for newPADxVOP in latest bleadperl * Mon Feb 21 2022 Tina Müller - updated to 0.27 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.27 2022-02-22 [CHANGES] * Updates to support Feature::Compat::Try 0.05 with new `finally {}` blocks * Wed Oct 13 2021 Tina Müller - updated to 0.26 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.26 2021-10-12 [CHANGES] * Many internal updates to hax/ support files [BUGFIXES] * Fix try { return } to work correctly in all contexts without upsetting -DDEBUGGING perls * Wed Jun 2 2021 Tina Müller - updated to 0.25 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.25 2021-06-01 [CHANGES] * Rewrite parsing logic to use XS::Parse::Keyword 0.06 * Removed the new-deprecated `try do { ... }` experimental syntax * Updated docs now that 5.34 is officially released, including `use feature 'try'`. * Tue May 11 2021 Tina Müller - updated to 0.24 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.24 2021-05-10 [CHANGES] * Deprecate the `try do { ... }` (experimental) syntax now that try-in-do works reliably. It will be removed soon because it gets in the way of converting the parser logic to XS::Parse::Keyword * Add documentation about the core `use feature 'try'` and Feature::Compat::Try module * Added an initial attempt at B::Deparse logic * Sun Mar 28 2021 Tina Müller - updated to 0.23 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.23 2021-03-27 [CHANGES] * Unit tests and documentation of the handling of the final-value semantics of `do { try ... }` * Also mention core's `feature 'try'` in documentation * Gives notice that the experimental 'try_value' feature is now discouraged and will eventually be removed 0.22 2021-03-26 [CHANGES] * Preserve wantarray context within the try {} block (RT133616) * List-context `try do {}` now works fine as well * Apply unit-testing for RT134790 * Sat Jan 23 2021 Tina Müller - updated to 0.21 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.21 2021-01-22 [CHANGES] * Add some import configuration options required to make Feature::Compat::Try work. Currently unit-tested but undocumented. * Tue Nov 24 2020 Tina Müller - updated to 0.20 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.20 2020-11-24 [BUGFIXES] * Fix for perl 5.14 by #include'ing hax/ files in the right order 0.19 2020-11-24 [CHANGES] * Avoid the core Off() and Bit() macros as they were removed after perl 5.33.3 * Support :experimental(try_value) to activate and silence the warning * Add documentation about the scalar context propagation issue of RT124229 * Sun Aug 2 2020 Tina Müller - 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 * Wed Jul 29 2020 Tina Müller - updated to 0.16 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.16 2020-07-23 [CHANGES] * Provide the `:experimental` import tag as a nicer way to silence experimental warnings [BUGFIXES] * Don't name a variable `class` because it upsets some C compilers (RT133043) * Tue Jul 21 2020 Tina Müller - updated to 0.15 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.15 2020-07-21 * Experimental typed `catch (VAR ...)` conditions * Wed Jul 8 2020 Tina Müller - updated to 0.14 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.14 2020-07-07 * Optional experimental syntax of `catch (VAR)` instead of previous experimental `catch my VAR` * Mark `catch my VAR` as deprecated * Added explicit use VERSION declarations to every perl file * Wed Jul 1 2020 Tina Müller - updated to 0.13 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.13 2020-06-29 [BUGFIXES] * Pack correct MANIFEST to include hax/ files 0.12 2020-06-29 [CHANGES] * Optional and experimental allocation of a new lexical under `catch my $VAR` syntax (RT130702). However, this syntax may not survive long, as part of the ongoing typed catch design work. [BUGFIXES] * Work around perl versions prior to 5.22 built with -DDEBUGGING getting upset about new*OP() being invoked with OP_CUSTOM (RT128562) * Sun Sep 8 2019 - updated to 0.11 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.11 2019-09-07 [CHANGES] * Use wrap_keyword_plugin() instead of direct access to PL_keyword_plugin [BUGFIXES] * Build OP_ENTER/OP_LEAVE structure the correct way so perl 5.31.3 doesn't crash * Fix OP_NEXT/OP_LAST/OP_REDO mangling for perl 5.31.3 to avoid CPU spin (RT129975) * Fri Jun 14 2019 Stephan Kulow - updated to 0.10 see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes 0.10 2019-06-13 [CHANGES] * Added experimental value-semantic expression form (RT121267) * Document that the module works nicely with Future::AsyncAwait * Ignore import symbols `catch` and `finally` [BUGFIXES] * Fixed spelling mistakes in documentation (patch from debian) (RT124140) * Wed Apr 3 2019 Stephan Kulow - initial package 0.09 * created by cpanspec 1.78.09