From a125522b2438d3cefb5f57772df5216c5ec64721e9d492a1555af2c4705b70a3 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 27 Jul 2013 12:47:02 +0000 Subject: [PATCH 1/2] - updated to 0.10 - fix pod links - support lexical subs on 5.18+ OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Eval-Closure?expand=0&rev=14 --- Eval-Closure-0.08.tar.gz | 3 --- Eval-Closure-0.10.tar.gz | 3 +++ perl-Eval-Closure.changes | 7 +++++++ perl-Eval-Closure.spec | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) delete mode 100644 Eval-Closure-0.08.tar.gz create mode 100644 Eval-Closure-0.10.tar.gz diff --git a/Eval-Closure-0.08.tar.gz b/Eval-Closure-0.08.tar.gz deleted file mode 100644 index 7317e81..0000000 --- a/Eval-Closure-0.08.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:738ce424d68ce1ac93c0b1539d6740ac8fff81fdd06ef7e4c8b022296922a407 -size 16746 diff --git a/Eval-Closure-0.10.tar.gz b/Eval-Closure-0.10.tar.gz new file mode 100644 index 0000000..752ed0a --- /dev/null +++ b/Eval-Closure-0.10.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df8a0e15408032630c4c8159da1b6dc3b093c341924720aa0653f8d11e32716b +size 17598 diff --git a/perl-Eval-Closure.changes b/perl-Eval-Closure.changes index 0f773ac..e73a5c4 100644 --- a/perl-Eval-Closure.changes +++ b/perl-Eval-Closure.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Jul 27 11:58:36 UTC 2013 - coolo@suse.com + +- updated to 0.10 + - fix pod links + - support lexical subs on 5.18+ + ------------------------------------------------------------------- Thu Mar 21 14:12:01 UTC 2013 - lars@linux-schulserver.de diff --git a/perl-Eval-Closure.spec b/perl-Eval-Closure.spec index e4b1546..ebf3a4d 100644 --- a/perl-Eval-Closure.spec +++ b/perl-Eval-Closure.spec @@ -17,7 +17,7 @@ Name: perl-Eval-Closure -Version: 0.08 +Version: 0.10 Release: 0 %define cpan_name Eval-Closure Summary: Safely and cleanly create closures via string eval From ba019221fe96115762a2c7b0c0af44c080da5c77909591da72e76bd32b671bfb Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 31 Jul 2013 14:13:44 +0000 Subject: [PATCH 2/2] - updated to 0.11 - add "alias => 1" option for making closure variables actually alias the closed over variables (so the variable referenced in the environment hashref will actually be updated by changes made in the closure). (Toby Inkster, #3) OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Eval-Closure?expand=0&rev=15 --- Eval-Closure-0.10.tar.gz | 3 --- Eval-Closure-0.11.tar.gz | 3 +++ perl-Eval-Closure.changes | 9 +++++++++ perl-Eval-Closure.spec | 28 +++++++++++++--------------- 4 files changed, 25 insertions(+), 18 deletions(-) delete mode 100644 Eval-Closure-0.10.tar.gz create mode 100644 Eval-Closure-0.11.tar.gz diff --git a/Eval-Closure-0.10.tar.gz b/Eval-Closure-0.10.tar.gz deleted file mode 100644 index 752ed0a..0000000 --- a/Eval-Closure-0.10.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df8a0e15408032630c4c8159da1b6dc3b093c341924720aa0653f8d11e32716b -size 17598 diff --git a/Eval-Closure-0.11.tar.gz b/Eval-Closure-0.11.tar.gz new file mode 100644 index 0000000..777760d --- /dev/null +++ b/Eval-Closure-0.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1923d3aeac0cf4a6cc9ed748ef548085e3ec3f3d14d669504d1fb56756279ac +size 18126 diff --git a/perl-Eval-Closure.changes b/perl-Eval-Closure.changes index e73a5c4..51032c6 100644 --- a/perl-Eval-Closure.changes +++ b/perl-Eval-Closure.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Jul 31 14:12:15 UTC 2013 - coolo@suse.com + +- updated to 0.11 + - add "alias => 1" option for making closure variables actually alias the + closed over variables (so the variable referenced in the environment + hashref will actually be updated by changes made in the closure). (Toby + Inkster, #3) + ------------------------------------------------------------------- Sat Jul 27 11:58:36 UTC 2013 - coolo@suse.com diff --git a/perl-Eval-Closure.spec b/perl-Eval-Closure.spec index ebf3a4d..8cc3451 100644 --- a/perl-Eval-Closure.spec +++ b/perl-Eval-Closure.spec @@ -17,11 +17,11 @@ Name: perl-Eval-Closure -Version: 0.10 +Version: 0.11 Release: 0 %define cpan_name Eval-Closure Summary: Safely and cleanly create closures via string eval -License: GPL-1.0+ or Artistic-1.0 +License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Eval-Closure/ Source: http://www.cpan.org/authors/id/D/DO/DOY/%{cpan_name}-%{version}.tar.gz @@ -29,13 +29,15 @@ BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros -BuildRequires: perl(Sub::Exporter) BuildRequires: perl(Test::Fatal) BuildRequires: perl(Test::More) >= 0.88 BuildRequires: perl(Test::Requires) BuildRequires: perl(Try::Tiny) -Requires: perl(Sub::Exporter) +#BuildRequires: perl(Devel::LexAlias) +#BuildRequires: perl(Eval::Closure) +#BuildRequires: perl(Perl::Tidy) Requires: perl(Try::Tiny) +Recommends: perl(Devel::LexAlias) >= 0.05 Recommends: perl(Perl::Tidy) %{perl_requires} @@ -45,23 +47,19 @@ String eval is often used for dynamic code generation. For instance, 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. +inside the eval), and it's easy to miss compilation errors, since eval +catches them and sticks them in $@ instead. -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). +This module attempts to solve these problems. It provides an 'eval_closure' +function, which evals a string in a clean environment, other than a fixed +list of specified variables. Compilation errors are rethrown automatically. %prep %setup -q -n %{cpan_name}-%{version} %if 0%{?suse_version} < 1210 mv t/00-compile.t t/00-compile.t.disable sed -i "s|^use Test::More;|use Test::More qw(no_plan);|g; \ - s|^done_testing;|#done_testing;|g" t/*.t + s|^done_testing;|#done_testing;|g" t/*.t mv t/00-compile.t.disable t/00-compile.t %endif @@ -79,6 +77,6 @@ mv t/00-compile.t.disable t/00-compile.t %files -f %{name}.files %defattr(-,root,root,755) -%doc Changes LICENSE README weaver.ini +%doc Changes LICENSE README %changelog