From 5a0844c43e719a6d267028aaf569b3d782df33ba Mon Sep 17 00:00:00 2001 From: Chris Weyl Date: Mon, 26 Nov 2007 18:18:37 +0000 Subject: [PATCH] *** empty log message *** --- .cvsignore | 1 + perl-Scope-Guard.spec | 61 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 63 insertions(+) create mode 100644 perl-Scope-Guard.spec diff --git a/.cvsignore b/.cvsignore index e69de29..62056f0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +Scope-Guard-0.03.tar.gz diff --git a/perl-Scope-Guard.spec b/perl-Scope-Guard.spec new file mode 100644 index 0000000..d30a868 --- /dev/null +++ b/perl-Scope-Guard.spec @@ -0,0 +1,61 @@ +Name: perl-Scope-Guard +Version: 0.03 +Release: 1%{?dist} +Summary: Lexically scoped resource management +License: GPL+ or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/Scope-Guard/ +Source0: http://www.cpan.org/authors/id/C/CH/CHOCOLATE/Scope-Guard-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +# core +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) +# test +BuildRequires: perl(Test::Pod) +BuildRequires: perl(Test::Pod::Coverage) + + +%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 honoured by perl's garbage +collector. + +%prep +%setup -q -n Scope-Guard-%{version} + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} + +make pure_install PERL_INSTALL_ROOT=%{buildroot} + +find %{buildroot} -type f -name .packlist -exec rm -f {} + +find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; + +%{_fixperms} %{buildroot}/* + +%check +make test + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc Changes README t/ +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Tue Sep 18 2007 Chris Weyl 0.03-1 +- Specfile autogenerated by cpanspec 1.71. diff --git a/sources b/sources index e69de29..cc1367c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +a33ab0a31d837b94797e61050afff894 Scope-Guard-0.03.tar.gz