forked from pool/perl-Eval-Closure
Accepting request 72088 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/72088 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Eval-Closure?expand=0&rev=3
This commit is contained in:
parent
31cc70f138
commit
c6d49bf02d
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:01b390e56a10378d3ed343c9a711967354c41a9fa73957b1c0f2b13d99e86260
|
|
||||||
size 15351
|
|
3
Eval-Closure-0.05.tar.gz
Normal file
3
Eval-Closure-0.05.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:42454a624b0b7d20e3e8214b1fd875d6e1610004bdf72ad84ea976f1f643647f
|
||||||
|
size 15491
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 4 10:55:03 UTC 2011 - coolo@opensuse.org
|
||||||
|
|
||||||
|
- updated to 0.05
|
||||||
|
- make sure Perl::Tidy doesn't look at @ARGV (rafl)
|
||||||
|
- stop using Memoize, it apparently doesn't work properly under mod_perl
|
||||||
|
in some situations (mateu)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Apr 16 00:41:51 CET 2011 - pascal.bleser@opensuse.org
|
Sat Apr 16 00:41:51 CET 2011 - pascal.bleser@opensuse.org
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-Eval-Closure
|
# spec file for package perl-Eval-Closure (Version 0.05)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -15,73 +15,66 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Name: perl-Eval-Closure
|
Name: perl-Eval-Closure
|
||||||
Version: 0.03
|
Version: 0.05
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: Safely and cleanly create closures via string eval
|
License: GPL+ or Artistic
|
||||||
Source: http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Eval-Closure-%{version}.tar.gz
|
%define cpan_name Eval-Closure
|
||||||
Url: http://search.cpan.org/dist/Eval-Closure
|
Summary: safely and cleanly create closures via string eval
|
||||||
|
Url: http://search.cpan.org/dist/Eval-Closure/
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
License: Perl License
|
Source: http://www.cpan.org/authors/id/D/DO/DOY/%{cpan_name}-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
%{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
|
BuildArch: noarch
|
||||||
%endif
|
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)
|
||||||
|
Requires: perl(Try::Tiny)
|
||||||
|
Recommends: perl(Perl::Tidy)
|
||||||
|
%{perl_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
String eval is often used for dynamic code generation. For instance,
|
String eval is often used for dynamic code generation. For instance,
|
||||||
"Moose" uses it heavily, to generate inlined versions of accessors and
|
'Moose' uses it heavily, to generate inlined versions of accessors and
|
||||||
constructors, which speeds code up at runtime by a significant amount.
|
constructors, which speeds code up at runtime by a significant amount.
|
||||||
String eval is not without its issues however - it's difficult to control
|
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
|
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
|
inside the eval), and it can be quite slow, especially if doing a large
|
||||||
number of evals.
|
number of evals.
|
||||||
|
|
||||||
This module attempts to solve both of those problems. It provides an
|
This module attempts to solve both of those problems. It provides an
|
||||||
"eval_closure" function, which evals a string in a clean environment,
|
'eval_closure' function, which evals a string in a clean environment, other
|
||||||
other than a fixed list of specified variables. It also caches the result
|
than a fixed list of specified variables. It also caches the result of the
|
||||||
of the eval, so that doing repeated evals of the same source, even with a
|
eval, so that doing repeated evals of the same source, even with a
|
||||||
different environment, will be much faster (but note that the description
|
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
|
is part of the string to be evaled, so it must also be the same (or
|
||||||
non-existent) if caching is to work properly).
|
non-existent) if caching is to work properly).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n "Eval-Closure-%{version}"
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
%__sed -i '/^auto_install/d' Makefile.PL
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%__perl Makefile.PL PREFIX="%{_prefix}"
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
%__make %{?_smp_flags}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%{__make} test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%perl_make_install
|
%perl_make_install
|
||||||
%perl_process_packlist
|
%perl_process_packlist
|
||||||
|
%perl_gen_filelist
|
||||||
%check
|
|
||||||
%__make test
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
%{__rm} -rf %{buildroot}
|
||||||
|
|
||||||
|
%files -f %{name}.files
|
||||||
|
%defattr(-,root,root,755)
|
||||||
|
%doc Changes LICENSE README weaver.ini
|
||||||
|
|
||||||
%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}
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user