From f87b27b360c5cd955c643f4b1b5d3ae5f520e4f13ee55cbc377bbc3aa811207e Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 2 May 2011 15:00:51 +0000 Subject: [PATCH] Accepting request 68128 from devel:languages:perl new dependencies of perl-Moose OBS-URL: https://build.opensuse.org/request/show/68128 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Eval-Closure?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + Eval-Closure-0.03.tar.gz | 3 ++ perl-Eval-Closure.changes | 5 +++ perl-Eval-Closure.spec | 70 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 102 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Eval-Closure-0.03.tar.gz create mode 100644 perl-Eval-Closure.changes create mode 100644 perl-Eval-Closure.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Eval-Closure-0.03.tar.gz b/Eval-Closure-0.03.tar.gz new file mode 100644 index 0000000..f67446c --- /dev/null +++ b/Eval-Closure-0.03.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01b390e56a10378d3ed343c9a711967354c41a9fa73957b1c0f2b13d99e86260 +size 15351 diff --git a/perl-Eval-Closure.changes b/perl-Eval-Closure.changes new file mode 100644 index 0000000..f095a87 --- /dev/null +++ b/perl-Eval-Closure.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Sat Apr 16 00:41:51 CET 2011 - pascal.bleser@opensuse.org + +- initial version (0.03) + diff --git a/perl-Eval-Closure.spec b/perl-Eval-Closure.spec new file mode 100644 index 0000000..5d77fd9 --- /dev/null +++ b/perl-Eval-Closure.spec @@ -0,0 +1,70 @@ +# vim: set sw=4 ts=4 et nu: + +Name: perl-Eval-Closure +Version: 0.03 +Release: 0 +Summary: Safely and cleanly create closures via string eval +Source: http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Eval-Closure-%{version}.tar.gz +URL: http://search.cpan.org/dist/Eval-Closure +Group: Development/Libraries/Perl +License: Perl License +BuildRoot: %{_tmppath}/build-%{name}-%{version} +%{perl_requires} +BuildRequires: perl-macros +BuildRequires: make +BuildRequires: perl(Test::Requires) +BuildRequires: perl(Test::Output) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.31 +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Sub::Exporter) +Requires: perl(Try::Tiny) +Requires: perl(Scalar::Util) +Requires: perl(Sub::Exporter) +%if 0%{?suse_version} >= 1120 +BuildArch: noarch +%endif + +%description +String eval is often used for dynamic code generation. For instance, +"Moose" uses it heavily, to generate inlined versions of accessors and +constructors, which speeds code up at runtime by a significant amount. +String eval is not without its issues however - it's difficult to control +the scope it's used in (which determines which variables are in scope +inside the eval), and it can be quite slow, especially if doing a large +number of evals. +This module attempts to solve both of those problems. It provides an +"eval_closure" function, which evals a string in a clean environment, +other than a fixed list of specified variables. It also caches the result +of the eval, so that doing repeated evals of the same source, even with a +different environment, will be much faster (but note that the description +is part of the string to be evaled, so it must also be the same (or +non-existent) if caching is to work properly). + +%prep +%setup -q -n "Eval-Closure-%{version}" +%__sed -i '/^auto_install/d' Makefile.PL + +%build +%__perl Makefile.PL PREFIX="%{_prefix}" +%__make %{?_smp_flags} + +%install +%perl_make_install +%perl_process_packlist + +%check +%__make test + +%clean +%{?buildroot:%__rm -rf "%{buildroot}"} + +%files +%defattr(-,root,root) +%doc README Changes LICENSE +%dir %{perl_vendorlib}/Eval +%{perl_vendorlib}/Eval/Closure.pm +%doc %{perl_man3dir}/Eval::Closure.%{perl_man3ext}%{ext_man} +