diff --git a/Try-Tiny-0.11.tar.gz b/Try-Tiny-0.11.tar.gz deleted file mode 100644 index dd24ba1..0000000 --- a/Try-Tiny-0.11.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:059e154ed82760bf6c1b6fddded800228bd97612d18159c68bfc36a8ea2bc885 -size 9923 diff --git a/Try-Tiny-0.12.tar.gz b/Try-Tiny-0.12.tar.gz new file mode 100644 index 0000000..91b8815 --- /dev/null +++ b/Try-Tiny-0.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f5c13c28909d9717bd79acc6b37d2a8f2d746f99abbacd7e03d2c3906179b2b +size 10320 diff --git a/perl-Try-Tiny.changes b/perl-Try-Tiny.changes index 6e9a6dc..f01e51e 100644 --- a/perl-Try-Tiny.changes +++ b/perl-Try-Tiny.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/perl-Try-Tiny.spec b/perl-Try-Tiny.spec index da632a6..d73076f 100644 --- a/perl-Try-Tiny.spec +++ b/perl-Try-Tiny.spec @@ -1,7 +1,7 @@ # # spec file for package perl-Try-Tiny # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,15 +16,14 @@ # - Name: perl-Try-Tiny -Version: 0.11 -Release: 1 -License: MIT +Version: 0.12 +Release: 0 %define cpan_name Try-Tiny Summary: Minimal try/catch with proper localization of $@ -Url: http://search.cpan.org/dist/Try-Tiny/ +License: MIT Group: Development/Libraries/Perl +Url: http://search.cpan.org/dist/Try-Tiny/ Source: http://www.cpan.org/authors/id/D/DO/DOY/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -37,9 +36,9 @@ 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 the TryCatch manpage 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 the Devel::Declare manpage and the +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 the Devel::Declare manpage and the Scope::Upper manpage which are occasionally problematic, and the additional catch filtering uses the Moose manpage type constraints which may not be desirable either. @@ -50,28 +49,30 @@ 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 the BACKGROUND manpage) and to be compatible +pathological edge cases (see the /BACKGROUND manpage) 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 two -examples both assign '"bar"' to '$x'. +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 making the following true. +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. +'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. %prep %setup -q -n %{cpan_name}-%{version}