Update to 0.11
- New upstream release 0.11 - Support lexical subs on 5.18+ - Fix pod links - 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) - Classify buildreqs by usage - Use %license - Make %files list more explicit - Update %description - Don't need to remove empty directories from the buildroot
This commit is contained in:
parent
01f1a4b281
commit
ddcd1cf974
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,8 +1 @@
|
|||||||
/Eval-Closure-0.01.tar.gz
|
/Eval-Closure-[0-9.]*.tar.gz
|
||||||
/Eval-Closure-0.02.tar.gz
|
|
||||||
/Eval-Closure-0.03.tar.gz
|
|
||||||
/Eval-Closure-0.04.tar.gz
|
|
||||||
/Eval-Closure-0.05.tar.gz
|
|
||||||
/Eval-Closure-0.06.tar.gz
|
|
||||||
/Eval-Closure-0.07.tar.gz
|
|
||||||
/Eval-Closure-0.08.tar.gz
|
|
||||||
|
@ -1,63 +1,90 @@
|
|||||||
Name: perl-Eval-Closure
|
Name: perl-Eval-Closure
|
||||||
Version: 0.08
|
Version: 0.11
|
||||||
Release: 8%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Safely and cleanly create closures via string eval
|
Summary: Safely and cleanly create closures via string eval
|
||||||
License: GPL+ or Artistic
|
License: GPL+ or Artistic
|
||||||
Group: Development/Libraries
|
|
||||||
URL: http://search.cpan.org/dist/Eval-Closure/
|
URL: http://search.cpan.org/dist/Eval-Closure/
|
||||||
Source0: http://www.cpan.org/authors/id/D/DO/DOY/Eval-Closure-%{version}.tar.gz
|
Source0: http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Eval-Closure-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
# Module Build
|
||||||
BuildRequires: perl(PadWalker)
|
BuildRequires: perl
|
||||||
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
|
||||||
|
# Module Runtime
|
||||||
|
BuildRequires: perl(Carp)
|
||||||
|
BuildRequires: perl(constant)
|
||||||
|
BuildRequires: perl(Devel::LexAlias) >= 0.05
|
||||||
|
BuildRequires: perl(Exporter)
|
||||||
|
BuildRequires: perl(overload)
|
||||||
BuildRequires: perl(Perl::Tidy)
|
BuildRequires: perl(Perl::Tidy)
|
||||||
BuildRequires: perl(Scalar::Util)
|
BuildRequires: perl(Scalar::Util)
|
||||||
BuildRequires: perl(Sub::Exporter)
|
BuildRequires: perl(strict)
|
||||||
|
BuildRequires: perl(Try::Tiny)
|
||||||
|
# Test Suite
|
||||||
|
BuildRequires: perl(B)
|
||||||
|
BuildRequires: perl(File::Find)
|
||||||
|
BuildRequires: perl(File::Temp)
|
||||||
|
BuildRequires: perl(PadWalker)
|
||||||
BuildRequires: perl(Test::Fatal)
|
BuildRequires: perl(Test::Fatal)
|
||||||
BuildRequires: perl(Test::More) >= 0.88
|
BuildRequires: perl(Test::More) >= 0.88
|
||||||
BuildRequires: perl(Test::Output)
|
BuildRequires: perl(Test::Output)
|
||||||
BuildRequires: perl(Test::Requires)
|
BuildRequires: perl(Test::Requires)
|
||||||
BuildRequires: perl(Try::Tiny)
|
BuildRequires: perl(warnings)
|
||||||
|
# Runtime
|
||||||
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||||
|
Requires: perl(Devel::LexAlias) >= 0.05
|
||||||
Requires: perl(Perl::Tidy)
|
Requires: perl(Perl::Tidy)
|
||||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
||||||
|
|
||||||
%{?perl_default_filter}
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
String eval is often used for dynamic code generation. For instance, Moose uses
|
String eval is often used for dynamic code generation. For instance, Moose uses
|
||||||
it heavily, to generate inlined versions of accessors and constructors, which
|
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
|
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
|
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's easy to miss
|
determines which variables are in scope inside the eval), and it can be quite
|
||||||
compilation errors, since eval catches them and sticks them in $@ instead.
|
slow, especially if doing a large number of evals.
|
||||||
|
|
||||||
This module attempts to solve these problems. It provides an eval_closure
|
This module attempts to solve both of those problems. It provides an
|
||||||
function, which evals a string in a clean environment, other than a fixed list
|
eval_closure function, which evals a string in a clean environment, other than
|
||||||
of specified variables. Compilation errors are rethrown automatically.
|
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
|
%prep
|
||||||
%setup -q -n Eval-Closure-%{version}
|
%setup -q -n Eval-Closure-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
perl Makefile.PL INSTALLDIRS=vendor
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make pure_install DESTDIR=%{buildroot}
|
make pure_install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
||||||
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
|
%{_fixperms} %{buildroot}
|
||||||
|
|
||||||
%{_fixperms} %{buildroot}/*
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test
|
make test
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc Changes LICENSE README
|
%license LICENSE
|
||||||
%{perl_vendorlib}/*
|
%doc Changes README
|
||||||
%{_mandir}/man3/*
|
%{perl_vendorlib}/Eval/
|
||||||
|
%{_mandir}/man3/Eval::Closure.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 12 2014 Paul Howarth <paul@city-fan.org> - 0.11-1
|
||||||
|
- Update to 0.11
|
||||||
|
- Support lexical subs on 5.18+
|
||||||
|
- Fix pod links
|
||||||
|
- 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)
|
||||||
|
- Classify buildreqs by usage
|
||||||
|
- Use %%license
|
||||||
|
- Make %%files list more explicit
|
||||||
|
- Update %%description
|
||||||
|
- Don't need to remove empty directories from the buildroot
|
||||||
|
|
||||||
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.08-8
|
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.08-8
|
||||||
- Perl 5.20 rebuild
|
- Perl 5.20 rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user