{"added":null,"apiVersion":1,"behindSince":null,"buildDepends":[],"categories":["devel","perl5"],"comment":"Safely and cleanly create closures via string eval","compare":"/compare/p5-eval-closure/index.json","dependentCount":null,"description":"String eval is often used for dynamic code generation. For instance, Moose uses\nit heavily, to generate inlined versions of accessors and constructors, which\nspeeds code up at runtime by a significant amount. String eval is not without\nits issues however - it's difficult to control the scope it's used in (which\ndetermines which variables are in scope inside the eval), and it can be quite\nslow, especially if doing a large number of evals.\n\nThis module attempts to solve both of those problems. It provides an\neval_closure function, which evals a string in a clean environment, other than\na fixed list of specified variables. It also caches the result of the eval, so\nthat doing repeated evals of the same source, even with a different\nenvironment, will be much faster (but note that the description is part of the\nstring to be evaled, so it must also be the same (or non-existent) if caching\nis to work properly).","flavors":[],"html":"https://daemonports.org/dragonfly/devel/p5-Eval-Closure/","kind":"port","lastUpdate":null,"license":["ART10","GPLv1+"],"maintainer":"perl@FreeBSD.org","name":"p5-Eval-Closure","newest":true,"newestVersion":"0.14","noVulnData":false,"origin":"devel/p5-Eval-Closure","otherSystems":[{"maintainer":"perl@FreeBSD.org","newest":true,"origin":"devel/p5-Eval-Closure","path":"/devel/p5-Eval-Closure/","system":"FreeBSD","version":"0.14"},{"maintainer":"The OpenBSD ports mailing-list \u003cports@openbsd.org\u003e","newest":true,"noVulnData":true,"origin":"devel/p5-Eval-Closure","path":"/openbsd/devel/p5-Eval-Closure/","system":"OpenBSD","version":"0.14p0"},{"maintainer":"pkgsrc-users@NetBSD.org","newest":true,"origin":"devel/p5-Eval-Closure","path":"/netbsd/devel/p5-Eval-Closure/","system":"NetBSD","updated":"2026-07-16","version":"0.14nb11"},{"maintainer":"ports@MidnightBSD.org","newest":true,"noVulnData":true,"origin":"devel/p5-Eval-Closure","path":"/midnightbsd/devel/p5-Eval-Closure/","system":"MidnightBSD","version":"0.14"},{"maintainer":"perl@FreeBSD.org","newest":true,"noVulnData":true,"origin":"devel/p5-Eval-Closure","path":"","system":"HardenedBSD","version":"0.14"},{"maintainer":"perl@FreeBSD.org","newest":true,"noVulnData":true,"origin":"devel/p5-Eval-Closure","path":"","system":"GhostBSD","version":"0.14"},{"maintainer":"perl@FreeBSD.org","newest":true,"noVulnData":true,"origin":"devel/p5-Eval-Closure","path":"","system":"OPNsense","version":"0.14"}],"packages":null,"pkgName":"p5-Eval-Closure-0.14","related":null,"repository":"DPorts","requiredBy":["devel/p5-Moose","devel/p5-Params-ValidationCompiler","devel/p5-Reply","devel/p5-Specio"],"requiredByCount":4,"runDepends":["lang/p5-Try-Tiny","lang/perl5.36"],"status":null,"system":"dragonfly","systemLabel":"DragonFly","version":"0.14","versions":null,"vulnerabilities":null,"www":"https://metacpan.org/release/Eval-Closure"}
