- 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
This commit is contained in:
parent
a125522b24
commit
ba019221fe
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:df8a0e15408032630c4c8159da1b6dc3b093c341924720aa0653f8d11e32716b
|
||||
size 17598
|
3
Eval-Closure-0.11.tar.gz
Normal file
3
Eval-Closure-0.11.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a1923d3aeac0cf4a6cc9ed748ef548085e3ec3f3d14d669504d1fb56756279ac
|
||||
size 18126
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user