Prune devel/py-EnthoughtBase
[dports.git] / devel / p5-Eval-Closure / pkg-descr
1 String eval is often used for dynamic code generation. For instance, Moose uses
2 it heavily, to generate inlined versions of accessors and constructors, which
3 speeds code up at runtime by a significant amount. String eval is not without
4 its issues however - it's difficult to control the scope it's used in (which
5 determines which variables are in scope inside the eval), and it can be quite
6 slow, especially if doing a large number of evals.
7
8 This module attempts to solve both of those problems. It provides an
9 eval_closure function, which evals a string in a clean environment, other than
10 a fixed list of specified variables. It also caches the result of the eval, so
11 that doing repeated evals of the same source, even with a different
12 environment, will be much faster (but note that the description is part of the
13 string to be evaled, so it must also be the same (or non-existent) if caching
14 is to work properly).
15
16 WWW: http://search.cpan.org/dist/Eval-Closure/