initial package
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Exception-Class-TryCatch?expand=0&rev=1
This commit is contained in:
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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
3
Exception-Class-TryCatch-1.12.tar.gz
Normal file
3
Exception-Class-TryCatch-1.12.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4161c9bcd11ac60f053db94a0fcb74844372bdea1701477f4bd31c132eb4235c
|
||||
size 17811
|
6
perl-Exception-Class-TryCatch.changes
Normal file
6
perl-Exception-Class-TryCatch.changes
Normal file
@@ -0,0 +1,6 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 06:13:30 UTC 2011 - coolo@opensuse.org
|
||||
|
||||
- initial package 1.12
|
||||
* created by cpanspec 1.78.04
|
||||
|
87
perl-Exception-Class-TryCatch.spec
Normal file
87
perl-Exception-Class-TryCatch.spec
Normal file
@@ -0,0 +1,87 @@
|
||||
#
|
||||
# spec file for package perl-Exception-Class-TryCatch (Version 1.12)
|
||||
#
|
||||
# Copyright (c) 2011 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
|
||||
# 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 http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
Name: perl-Exception-Class-TryCatch
|
||||
Version: 1.12
|
||||
Release: 1
|
||||
License: Apache Software License
|
||||
%define cpan_name Exception-Class-TryCatch
|
||||
Summary: Syntactic tryE<sol>catch sugar for use with Exception::Class
|
||||
Url: http://search.cpan.org/dist/Exception-Class-TryCatch/
|
||||
Group: Development/Libraries/Perl
|
||||
Source: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/%{cpan_name}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: perl(Exception::Class) >= 1.2
|
||||
BuildRequires: perl(Module::Build)
|
||||
Requires: perl(Exception::Class) >= 1.2
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
Exception::Class::TryCatch provides syntactic sugar for use with the
|
||||
Exception::Class manpage using the familiar keywords 'try' and 'catch'. Its
|
||||
primary objective is to allow users to avoid dealing directly with '$@' by
|
||||
ensuring that any exceptions caught in an 'eval' are captured as the
|
||||
Exception::Class manpage objects, whether they were thrown objects to begin
|
||||
with or whether the error resulted from 'die'. This means that users may
|
||||
immediately use 'isa' and various the Exception::Class manpage methods to
|
||||
process the exception.
|
||||
|
||||
In addition, this module provides for a method to push errors onto a hidden
|
||||
error stack immediately after an 'eval' so that cleanup code or other error
|
||||
handling may also call 'eval' without the original error in '$@' being
|
||||
lost.
|
||||
|
||||
Inspiration for this module is due in part to Dave Rolsky's article
|
||||
"Exception Handling in Perl With Exception::Class" in _The Perl Journal_
|
||||
(Rolsky 2004).
|
||||
|
||||
The 'try/catch' syntax used in this module does not use code reference
|
||||
prototypes the way the Error module does, but simply provides some helpful
|
||||
functionality when used in combination with 'eval'. As a result, it avoids
|
||||
the complexity and dangers involving nested closures and memory leaks
|
||||
inherent in Error (Perrin 2003).
|
||||
|
||||
Rolsky (2004) notes that these memory leaks may not occur in recent
|
||||
versions of Perl, but the approach used in Exception::Class::TryCatch
|
||||
should be safe for all versions of Perl as it leaves all code execution to
|
||||
the 'eval' in the current scope, avoiding closures altogether.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
|
||||
%build
|
||||
%{__perl} Build.PL installdirs=vendor
|
||||
./Build build flags=%{?_smp_mflags}
|
||||
|
||||
%check
|
||||
./Build test
|
||||
|
||||
%install
|
||||
./Build install destdir=%{buildroot} create_packlist=0
|
||||
%perl_gen_filelist
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root,755)
|
||||
%doc Changes LICENSE README Todo
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user