diff --git a/Scope-Guard-0.21.tar.gz b/Scope-Guard-0.21.tar.gz new file mode 100644 index 0000000..1eb6a82 Binary files /dev/null and b/Scope-Guard-0.21.tar.gz differ diff --git a/perl-Scope-Guard.spec b/perl-Scope-Guard.spec new file mode 100644 index 0000000..8831a23 --- /dev/null +++ b/perl-Scope-Guard.spec @@ -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 -0.21 -1 +- Package init \ No newline at end of file