Sync from SUSE:SLFO:Main perl-Try-Tiny revision 365204a5c81481f648bd1d8f0f245d26
This commit is contained in:
commit
dbb399bb18
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
BIN
Try-Tiny-0.31.tar.gz
(Stored with Git LFS)
Normal file
BIN
Try-Tiny-0.31.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
28
cpanspec.yml
Normal file
28
cpanspec.yml
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
#description_paragraphs: 3
|
||||
#description: |-
|
||||
# override description from CPAN
|
||||
#summary: override summary from CPAN
|
||||
#no_testing: broken upstream
|
||||
#sources:
|
||||
# - source1
|
||||
# - source2
|
||||
#patches:
|
||||
# foo.patch: -p1
|
||||
# bar.patch:
|
||||
#preamble: |-
|
||||
# BuildRequires: gcc-c++
|
||||
#post_prep: |-
|
||||
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||
#post_build: |-
|
||||
# rm unused.files
|
||||
#post_install: |-
|
||||
# sed on %{name}.files
|
||||
#license: SUSE-NonFree
|
||||
#skip_noarch: 1
|
||||
#custom_build: |-
|
||||
#./Build build flags=%{?_smp_mflags} --myflag
|
||||
#custom_test: |-
|
||||
#startserver && make test
|
||||
#ignore_requires: Bizarre::Module
|
187
perl-Try-Tiny.changes
Normal file
187
perl-Try-Tiny.changes
Normal file
@ -0,0 +1,187 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 24 03:09:38 UTC 2021 - Tina Müller <timueller+perl@suse.de>
|
||||
|
||||
- updated to 0.31
|
||||
see /usr/share/doc/packages/perl-Try-Tiny/Changes
|
||||
|
||||
0.31 2021-11-23 20:29:12Z
|
||||
- plug Syntax::Keyword::Try and Feature::Compat::Try in the docs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 23 07:18:07 UTC 2018 - coolo@suse.com
|
||||
|
||||
- updated to 0.30
|
||||
see /usr/share/doc/packages/perl-Try-Tiny/Changes
|
||||
|
||||
0.30 2017-12-21 07:23:03Z
|
||||
- expand "when" test skippage to more perl versions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 19 07:06:08 UTC 2017 - coolo@suse.com
|
||||
|
||||
- updated to 0.29
|
||||
see /usr/share/doc/packages/perl-Try-Tiny/Changes
|
||||
|
||||
0.29 2017-12-19 03:51:26Z
|
||||
- skip tests of "when" and "given/when" usage for perl 5.27.7 *only* (see
|
||||
RT#123908)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 9 07:24:37 UTC 2017 - coolo@suse.com
|
||||
|
||||
- updated to 0.28
|
||||
see /usr/share/doc/packages/perl-Try-Tiny/Changes
|
||||
|
||||
0.28 2017-01-09 01:21:33Z
|
||||
- enabled some tests of finally blocks that were disabled on 5.6, now that
|
||||
that functionality works (since 0.13) (Pali, PR#4)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 16 06:02:06 UTC 2016 - coolo@suse.com
|
||||
|
||||
- updated to 0.27
|
||||
see /usr/share/doc/packages/perl-Try-Tiny/Changes
|
||||
|
||||
0.27 2016-08-16 01:43:35Z
|
||||
- repository moved to the github p5sagit organization (the primary is on
|
||||
shadowcat, mirrored to github)
|
||||
- no changes since 0.26
|
||||
|
||||
0.26 2016-03-15 23:42:02Z (TRIAL RELEASE)
|
||||
- switch from finalizers using an array to a hash, to resolve segfaults when
|
||||
creating a pseudofork on MSWin before perl 5.20 (Graham Knop,
|
||||
karenetheridge/Sub-Name/#3)
|
||||
|
||||
0.25 2016-02-22 20:16:51Z (TRIAL RELEASE)
|
||||
- "finally" blocks are now run for all methods of leaving the try block
|
||||
(including via exit, goto) (Lukas Mai, RT#112099)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 11 10:21:11 UTC 2015 - coolo@suse.com
|
||||
|
||||
- updated to 0.24
|
||||
see /usr/share/doc/packages/perl-Try-Tiny/Changes
|
||||
|
||||
0.24 2015-12-11 05:20:09Z
|
||||
- fix prereq errors in 0.23
|
||||
|
||||
0.23 2015-12-11 04:04:35Z
|
||||
- fix syntax of example code (Rudolf Leermakers, PR#22)
|
||||
- 'perl' removed from prerequisite recommendations, to avoid tripping up
|
||||
CPAN clients (Graham Knop)
|
||||
- Sub::Util is used preferentially to Sub::Name in most cases (Graham Knop,
|
||||
PR#27)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 23 21:32:47 UTC 2014 - mardnh@gmx.de
|
||||
|
||||
- updated to 0.22
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 21 20:24:52 UTC 2014 - mardnh@gmx.de
|
||||
|
||||
- updated to 0.21
|
||||
- 0.21 2014-04-15
|
||||
- also skip the test if Capture::Tiny is too old (Martin Popel, #17)
|
||||
|
||||
- 0.20 2014-03-21
|
||||
- documentation updates (Flimm, #15)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 9 13:34:21 UTC 2014 - coolo@suse.com
|
||||
|
||||
- updated to 0.19
|
||||
- fix an obscure issue with loading modules during global destruction
|
||||
(ilmari, #11)
|
||||
- documentation updates (anaxagoras, #12)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 4 09:13:58 UTC 2013 - coolo@suse.com
|
||||
|
||||
- updated to 0.18
|
||||
- fix tests for pre-Test-More-0.88 (Paul Howarth, #10)
|
||||
- work around [rt.perl #119311] which was causing incorrect error messages in
|
||||
some cases during global destruction (Graham Knop, #9)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 27 11:57:46 UTC 2013 - coolo@suse.com
|
||||
|
||||
- updated to 0.16
|
||||
- remove accidental Sub::Name test dep
|
||||
- optionally use Sub::Name to name the try/catch/finally blocks, if available
|
||||
(Mark Fowler)
|
||||
- also throw an exception for catch/finally in scalar context (RT#81070)
|
||||
- fix tests failing on 5.6.x due to differing DESTROY semantics
|
||||
- excise superfluous local($@) call - 7% speedup
|
||||
- fix (fsvo) broken URLs (RT#55659)
|
||||
- proper exception on erroneous usage of bare catch/finally (RT#81070)
|
||||
- proper exception on erroneous use of multiple catch{} blocks
|
||||
- clarify exception occuring on unterminated try block (RT#75712)
|
||||
- fix the prototypes shown in docs to match code (RT#79590; thanks, Pushtaev
|
||||
Vadim)
|
||||
- warn loudly on exceptions in finally() blocks
|
||||
- dzilify
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 11 09:35:47 UTC 2013 - coolo@suse.com
|
||||
|
||||
- rebuild for perl 5.18
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 4 15:25:34 UTC 2013 - coolo@suse.com
|
||||
|
||||
- updated to 0.12
|
||||
- doc fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 19 09:04:58 UTC 2011 - coolo@suse.com
|
||||
|
||||
- updated to 0.11
|
||||
- fix broken dist
|
||||
- clarify some docs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 17 12:12:23 UTC 2011 - coolo@opensuse.org
|
||||
|
||||
- updated to 0.09
|
||||
- don't index Try::Tiny::ScopeGuard
|
||||
- fix require vs use issue in blead (RT63410)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 30 19:20:56 UTC 2010 - coolo@novell.com
|
||||
|
||||
- switch to perl_requires macro
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 11 18:04:16 UTC 2010 - chris@computersalat.de
|
||||
|
||||
- recreated by cpanspec 1.78
|
||||
o fixed deps
|
||||
o fix License
|
||||
- noarch pkg
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 1 11:28:49 UTC 2010 - pascal.bleser@opensuse.org
|
||||
|
||||
- update to 0.07:
|
||||
* allow multiple finally blocks
|
||||
* pass the error, if any, to finally blocks when called
|
||||
|
||||
- changes from 0.05:
|
||||
* documentation fixes and clarifications
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 25 08:18:26 UTC 2010 - lars@linux-schulserver.de
|
||||
|
||||
- update to 0.04:
|
||||
+ Restore list context propagation for catch blocks
|
||||
+ Fix a bug where finally blocks weren't always invoked
|
||||
+ More documentation and tests (many people)
|
||||
+ Sets $@ to the previous value at the beginning of the eval, to
|
||||
allow the capture of an error stack when calling die.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 26 21:40:19 UTC 2009 - lars@linux-schulserver.de
|
||||
|
||||
- initial version 0.02
|
||||
|
101
perl-Try-Tiny.spec
Normal file
101
perl-Try-Tiny.spec
Normal file
@ -0,0 +1,101 @@
|
||||
#
|
||||
# spec file for package perl-Try-Tiny
|
||||
#
|
||||
# Copyright (c) 2021 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 Try-Tiny
|
||||
Name: perl-Try-Tiny
|
||||
Version: 0.31
|
||||
Release: 0
|
||||
Summary: Minimal try/catch with proper preservation of $@
|
||||
License: MIT
|
||||
URL: https://metacpan.org/release/%{cpan_name}
|
||||
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz
|
||||
Source1: cpanspec.yml
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
This module provides bare bones 'try'/'catch'/'finally' statements that are
|
||||
designed to minimize common mistakes with eval blocks, and NOTHING else.
|
||||
|
||||
This is unlike TryCatch which provides a nice syntax and avoids adding
|
||||
another call stack layer, and supports calling 'return' from the 'try'
|
||||
block to return from the parent subroutine. These extra features come at a
|
||||
cost of a few dependencies, namely Devel::Declare and Scope::Upper which
|
||||
are occasionally problematic, and the additional catch filtering uses Moose
|
||||
type constraints which may not be desirable either.
|
||||
|
||||
The main focus of this module is to provide simple and reliable error
|
||||
handling for those having a hard time installing TryCatch, but who still
|
||||
want to write correct 'eval' blocks without 5 lines of boilerplate each
|
||||
time.
|
||||
|
||||
It's designed to work as correctly as possible in light of the various
|
||||
pathological edge cases (see BACKGROUND) and to be compatible with any
|
||||
style of error values (simple strings, references, objects, overloaded
|
||||
objects, etc).
|
||||
|
||||
If the 'try' block dies, it returns the value of the last statement
|
||||
executed in the 'catch' block, if there is one. Otherwise, it returns
|
||||
'undef' in scalar context or the empty list in list context. The following
|
||||
examples all assign '"bar"' to '$x':
|
||||
|
||||
my $x = try { die "foo" } catch { "bar" };
|
||||
my $x = try { die "foo" } || "bar";
|
||||
my $x = (try { die "foo" }) // "bar";
|
||||
|
||||
my $x = eval { die "foo" } || "bar";
|
||||
|
||||
You can add 'finally' blocks, yielding the following:
|
||||
|
||||
my $x;
|
||||
try { die 'foo' } finally { $x = 'bar' };
|
||||
try { die 'foo' } catch { warn "Got a die: $_" } finally { $x = 'bar' };
|
||||
|
||||
'finally' blocks are always executed making them suitable for cleanup code
|
||||
which cannot be handled using local. You can add as many 'finally' blocks
|
||||
to a given 'try' block as you like.
|
||||
|
||||
Note that adding a 'finally' block without a preceding 'catch' block
|
||||
suppresses any errors. This behaviour is consistent with using a standalone
|
||||
'eval', but it is not consistent with 'try'/'finally' patterns found in
|
||||
other programming languages, such as Java, Python, Javascript or C#. If you
|
||||
learned the 'try'/'finally' pattern from one of these languages, watch out
|
||||
for this.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{cpan_name}-%{version}
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
%make_build
|
||||
|
||||
%check
|
||||
make test
|
||||
|
||||
%install
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%files -f %{name}.files
|
||||
%doc Changes CONTRIBUTING README
|
||||
%license LICENCE
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user