[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
47/72: gnu: Add Eval-Closure.
From: |
Eric Bavier |
Subject: |
47/72: gnu: Add Eval-Closure. |
Date: |
Fri, 06 Mar 2015 14:13:06 +0000 |
bavier pushed a commit to branch master
in repository guix.
commit 8bc9515d9bdd8c854024d6b60a59692ecfcbd77f
Author: Eric Bavier <address@hidden>
Date: Thu Mar 5 16:32:00 2015 -0600
gnu: Add Eval-Closure.
* gnu/packages/perl.scm (perl-eval-closure): New variable.
---
gnu/packages/perl.scm | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index a50927a..0911c70 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -485,6 +485,38 @@ SHA-1 message digest algorithm for use by Perl programs.")
modules separately and deal with them after the module is done installing.")
(license (package-license perl))))
+(define-public perl-eval-closure
+ (package
+ (name "perl-eval-closure")
+ (version "0.12")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/D/DO/DOY/"
+ "Eval-Closure-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ssvlgx3y1y28wrrp0lmmffzqxfrwb2lb3p60b8cjvxsf1c3jbfv"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-test-fatal" ,perl-test-fatal)
+ ("perl-test-requires" ,perl-test-requires)))
+ (propagated-inputs
+ `(("perl-devel-lexalias" ,perl-devel-lexalias)))
+ (home-page "http://search.cpan.org/dist/Eval-Closure")
+ (synopsis "Safely and cleanly create closures via string eval")
+ (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's easy to miss compilation errors, since eval catches them and sticks
+them in $@ instead. 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.")
+ (license (package-license perl))))
+
(define-public perl-exporter-lite
(package
(name "perl-exporter-lite")
- branch master updated (36a1eec -> 840e577), Eric Bavier, 2015/03/06
- 52/72: gnu: Add Test-Differences., Eric Bavier, 2015/03/06
- 53/72: gnu: Add Class-Data-Inheritable., Eric Bavier, 2015/03/06
- 54/72: gnu: Add Exception-Class., Eric Bavier, 2015/03/06
- 47/72: gnu: Add Eval-Closure.,
Eric Bavier <=
- 56/72: gnu: Add Test-Exception., Eric Bavier, 2015/03/06
- 49/72: gnu: Add inc-latest., Eric Bavier, 2015/03/06
- 51/72: gnu: Add Text-Diff., Eric Bavier, 2015/03/06
- 50/72: gnu: Add Algorithm-Diff., Eric Bavier, 2015/03/06
- 61/72: gnu: Add File-HomeDir., Eric Bavier, 2015/03/06
- 48/72: gnu: Add Config-AutoConf., Eric Bavier, 2015/03/06
- 63/72: gnu: Add Test-WriteVariants., Eric Bavier, 2015/03/06
- 55/72: gnu: Add Module-Build., Eric Bavier, 2015/03/06
- 57/72: gnu: Add Test-Most., Eric Bavier, 2015/03/06
- 69/72: gnu: Add Devel-CheckBin., Eric Bavier, 2015/03/06