BSD Ports

devel/p5-Eval-Closure 0.14 FreeBSD

Safely and cleanly create closures via string eval

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
ART10, GPLv1+
Categories
devel, perl5
Package size
10.9 KiB, 19.5 KiB installed

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).

In the other systems

SystemPortVersion
FreeBSDdevel/p5-Eval-Closure0.14
OpenBSDdevel/p5-Eval-Closure0.14p0
NetBSDdevel/p5-Eval-Closure0.14nb11
DragonFlydevel/p5-Eval-Closure0.14
MidnightBSDdevel/p5-Eval-Closure0.14
HardenedBSDdevel/p5-Eval-Closure0.14
GhostBSDdevel/p5-Eval-Closure0.14
OPNsensedevel/p5-Eval-Closure0.14

Install

Binary package:

pkg install p5-Eval-Closure

From the ports tree:

cd /usr/ports/devel/p5-Eval-Closure/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-Eval-Closure>0:devel/p5-Eval-Closure

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.140.140.140.140.14
FreeBSD:14:quarterly0.140.14n/a0.140.14
FreeBSD:15:latest0.140.14n/a0.140.14
FreeBSD:15:quarterly0.140.14n/an/an/a
FreeBSD:16:latest0.140.14n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 1

Runtime 1

Test 3

The full lists below include those, and their dependencies in turn.

Build dependencies 2
Run dependencies 2
Required by 610

The first 100 are listed.

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 2
  • %%SITE_PERL%%/Eval/Closure.pm
  • %%PERL5_MAN3%%/Eval::Closure.3.gz
distinfo 1
FileSizeSHA256
Eval-Closure-0.14.tar.gz20128ea0944f2f5ec98d895bef6d503e6e4a376fea6383a6bc64c7670d46ff2218cad
Master sites 1
  • CPAN

Commit history 0

No commits in the history this site was built from.