1 | Name: perl-Eval-Closure |
---|
2 | Version: 0.08 |
---|
3 | Release: 1%{?_dist_release} |
---|
4 | Summary: Safely and cleanly create closures via string eval |
---|
5 | License: GPL+ or Artistic |
---|
6 | Group: Development/Libraries |
---|
7 | URL: http://search.cpan.org/dist/Eval-Closure/ |
---|
8 | Source0: http://www.cpan.org/authors/id/D/DO/DOY/Eval-Closure-%{version}.tar.gz |
---|
9 | BuildArch: noarch |
---|
10 | BuildRequires: perl(ExtUtils::MakeMaker) |
---|
11 | BuildRequires: perl(PadWalker) |
---|
12 | BuildRequires: perl(Perl::Tidy) |
---|
13 | BuildRequires: perl(Scalar::Util) |
---|
14 | BuildRequires: perl(Sub::Exporter) |
---|
15 | BuildRequires: perl(Test::Fatal) |
---|
16 | BuildRequires: perl(Test::More) >= 0.88 |
---|
17 | BuildRequires: perl(Test::Output) |
---|
18 | BuildRequires: perl(Test::Requires) |
---|
19 | BuildRequires: perl(Try::Tiny) |
---|
20 | Requires: perl(Perl::Tidy) |
---|
21 | Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
---|
22 | |
---|
23 | %{?perl_default_filter} |
---|
24 | |
---|
25 | %description |
---|
26 | String eval is often used for dynamic code generation. For instance, Moose uses |
---|
27 | it heavily, to generate inlined versions of accessors and constructors, which |
---|
28 | speeds code up at runtime by a significant amount. String eval is not without |
---|
29 | its issues however - it's difficult to control the scope it's used in (which |
---|
30 | determines which variables are in scope inside the eval), and it's easy to miss |
---|
31 | compilation errors, since eval catches them and sticks them in $@ instead. |
---|
32 | |
---|
33 | This module attempts to solve these problems. It provides an eval_closure |
---|
34 | function, which evals a string in a clean environment, other than a fixed list |
---|
35 | of specified variables. Compilation errors are rethrown automatically. |
---|
36 | |
---|
37 | %prep |
---|
38 | %setup -q -n Eval-Closure-%{version} |
---|
39 | |
---|
40 | %build |
---|
41 | %{__perl} Makefile.PL INSTALLDIRS=vendor |
---|
42 | make %{?_smp_mflags} |
---|
43 | |
---|
44 | %install |
---|
45 | rm -rf %{buildroot} |
---|
46 | |
---|
47 | make pure_install DESTDIR=%{buildroot} |
---|
48 | |
---|
49 | find %{buildroot} -type f -name .packlist -exec rm -f {} \; |
---|
50 | find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; |
---|
51 | |
---|
52 | %{_fixperms} %{buildroot}/* |
---|
53 | |
---|
54 | %check |
---|
55 | make test |
---|
56 | |
---|
57 | %clean |
---|
58 | rm -rf %{buildroot} |
---|
59 | |
---|
60 | %files |
---|
61 | %doc Changes LICENSE README |
---|
62 | %{perl_vendorlib}/* |
---|
63 | %{_mandir}/man3/* |
---|
64 | |
---|
65 | %changelog |
---|
66 | * Mon Mar 05 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.08-1 |
---|
67 | - initial build for Vine Linux |
---|
68 | |
---|
69 | * Fri Feb 10 2012 Iain Arnell <iarnell@gmail.com> 0.08-1 |
---|
70 | - update to latest upstream version |
---|
71 | |
---|
72 | * Sat Feb 04 2012 Iain Arnell <iarnell@gmail.com> 0.07-1 |
---|
73 | - update to latest upstream version |
---|
74 | - update description |
---|
75 | |
---|
76 | * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.06-3 |
---|
77 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
---|
78 | |
---|
79 | * Wed Jun 29 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.06-2 |
---|
80 | - Perl mass rebuild |
---|
81 | |
---|
82 | * Tue Jun 07 2011 Iain Arnell <iarnell@gmail.com> 0.06-1 |
---|
83 | - update to latest upstream version |
---|
84 | |
---|
85 | * Wed May 04 2011 Iain Arnell <iarnell@gmail.com> 0.05-1 |
---|
86 | - update to latest upstream version |
---|
87 | |
---|
88 | * Wed Apr 20 2011 Iain Arnell <iarnell@gmail.com> 0.04-1 |
---|
89 | - update to latest upstream version |
---|
90 | |
---|
91 | * Thu Mar 03 2011 Iain Arnell <iarnell@gmail.com> 0.03-1 |
---|
92 | - update to latest upstream version |
---|
93 | |
---|
94 | * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.02-2 |
---|
95 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
96 | |
---|
97 | * Fri Jan 28 2011 Iain Arnell <iarnell@gmail.com> 0.02-1 |
---|
98 | - update to latest upstream version |
---|
99 | |
---|
100 | * Sun Jan 23 2011 Iain Arnell <iarnell@gmail.com> 0.01-1 |
---|
101 | - Specfile autogenerated by cpanspec 1.78. |
---|