Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 50076fdb4639c805a9907d8f5a5f1ea6 > files > 2

perl-Eval-Closure-0.80.0-2.mga3.src.rpm

%define upstream_name    Eval-Closure
%define upstream_version 0.08

Name:       perl-%{upstream_name}
Version:    %perl_convert_version %{upstream_version}
Release:    %mkrel 2

Summary:    Safely and cleanly create closures via string eval
License:    GPL+ or Artistic
Group:      Development/Perl
Url:        http://search.cpan.org/dist/%{upstream_name}
Source0:    http://www.cpan.org/modules/by-module/Eval/%{upstream_name}-%{upstream_version}.tar.gz

BuildRequires: perl(ExtUtils::MakeMaker) >= 6.300.0
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(Sub::Exporter)
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::More) >= 0.880.0
BuildRequires: perl(Test::Requires)
BuildRequires: perl(Try::Tiny)
BuildArch:  noarch

%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 %{upstream_name}-%{upstream_version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor

%make

%check
%make test

%install
%makeinstall_std

%files
%doc Changes LICENSE META.json META.yml MYMETA.yml README
%{_mandir}/man3/*
%perl_vendorlib/*

%changelog

* Sun Jan 13 2013 umeabot <umeabot> 0.80.0-2.mga3
+ Revision: 366908
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Thu Feb 23 2012 jquelin <jquelin> 0.80.0-1.mga2
+ Revision: 212859
- update to 0.08

* Wed Jun 15 2011 jquelin <jquelin> 0.60.0-1.mga2
+ Revision: 106933
- update to 0.06

* Tue Apr 19 2011 jquelin <jquelin> 0.40.0-1.mga1
+ Revision: 88517
- update to 0.04

* Wed Apr 13 2011 jquelin <jquelin> 0.30.0-1.mga1
+ Revision: 84246
- imported package perl-Eval-Closure