commit
eb348dcb68
BIN
Scope-Guard-0.21.tar.gz
Normal file
BIN
Scope-Guard-0.21.tar.gz
Normal file
Binary file not shown.
45
perl-Scope-Guard.spec
Normal file
45
perl-Scope-Guard.spec
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
Name: perl-Scope-Guard
|
||||||
|
Summary: Lexically scoped resource management
|
||||||
|
Version: 0.21
|
||||||
|
Release: 1
|
||||||
|
License: GPL+ or Artistic
|
||||||
|
Source0: https://cpan.metacpan.org/authors/id/C/CH/CHOCOLATE/Scope-Guard-%{version}.tar.gz
|
||||||
|
URL: https://metacpan.org/release/Scope-Guard
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: perl-interpreter
|
||||||
|
BuildRequires: perl-generators
|
||||||
|
|
||||||
|
%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
|
||||||
|
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 honored by perl's garbage
|
||||||
|
collector.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n Scope-Guard-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
perl Makefile.PL INSTALLDIRS=vendor
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
make pure_install DESTDIR=%{buildroot}
|
||||||
|
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
||||||
|
%{_fixperms} %{buildroot}
|
||||||
|
|
||||||
|
%check
|
||||||
|
make test
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc Changes README t/
|
||||||
|
%{perl_vendorlib}/Scope/
|
||||||
|
%{_mandir}/man3/Scope::Guard.3*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Aug 3 2020 dingyue <dingyue5@huawei.com> -0.21 -1
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user