2010-11-10 21:40:53 +01:00
|
|
|
#
|
2015-07-20 11:31:52 +02:00
|
|
|
# spec file for package perl-Scope-Guard
|
2010-11-10 21:40:53 +01:00
|
|
|
#
|
2015-07-20 11:31:52 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2010-11-10 21:40:53 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2015-07-20 11:31:52 +02:00
|
|
|
Name: perl-Scope-Guard
|
|
|
|
Version: 0.21
|
|
|
|
Release: 0
|
2008-12-11 14:03:52 +01:00
|
|
|
%define cpan_name Scope-Guard
|
2015-07-20 11:31:52 +02:00
|
|
|
Summary: Lexically-Scoped Resource Management
|
|
|
|
License: Artistic-1.0 or GPL-1.0+
|
2010-11-10 21:40:53 +01:00
|
|
|
Group: Development/Libraries/Perl
|
|
|
|
Url: http://search.cpan.org/dist/Scope-Guard/
|
2015-07-20 11:31:52 +02:00
|
|
|
Source0: http://www.cpan.org/authors/id/C/CH/CHOCOLATE/%{cpan_name}-%{version}.tar.gz
|
|
|
|
Source1: cpanspec.yml
|
|
|
|
BuildArch: noarch
|
2010-11-10 21:40:53 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-07-20 11:31:52 +02:00
|
|
|
BuildRequires: perl
|
2010-12-03 15:49:28 +01:00
|
|
|
BuildRequires: perl-macros
|
2015-07-20 11:31:52 +02:00
|
|
|
%{perl_requires}
|
2008-12-11 14:03:52 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This module provides a convenient way to perform cleanup or other forms of
|
|
|
|
resource management at the end of a scope. It is particularly useful when
|
2015-07-20 11:31:52 +02:00
|
|
|
dealing with exceptions: the 'Scope::Guard' constructor takes a reference
|
|
|
|
to a subroutine that is guaranteed to be called even if the thread of
|
|
|
|
execution is aborted prematurely. This effectively allows lexically-scoped
|
|
|
|
"promises" to be made that are automatically honoured by perl's garbage
|
|
|
|
collector.
|
|
|
|
|
|
|
|
For more information, see: the http://www.drdobbs.com/cpp/184403758 manpage
|
2008-12-11 14:03:52 +01:00
|
|
|
|
|
|
|
%prep
|
2015-07-20 11:31:52 +02:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2008-12-11 14:03:52 +01:00
|
|
|
|
|
|
|
%build
|
2015-07-20 11:31:52 +02:00
|
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%{__make} test
|
2008-12-11 14:03:52 +01:00
|
|
|
|
|
|
|
%install
|
2015-07-20 11:31:52 +02:00
|
|
|
%perl_make_install
|
2008-12-11 14:03:52 +01:00
|
|
|
%perl_process_packlist
|
2015-07-20 11:31:52 +02:00
|
|
|
%perl_gen_filelist
|
2008-12-11 14:03:52 +01:00
|
|
|
|
2015-07-20 11:31:52 +02:00
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root,755)
|
|
|
|
%doc Changes README
|
2008-12-11 14:03:52 +01:00
|
|
|
|
2010-11-10 21:40:53 +01:00
|
|
|
%changelog
|