devel/p5-constant-defer 6 FreeBSD
Constant subs with deferred value calculation
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- License
- GPLv3
- Categories
- devel, perl5
- Package size
- 23.1 KiB, 53.8 KiB installed
Description
constant::defer creates a subroutine which on the first call runs given code to calculate its value, and on any subsequent calls just returns that value, like a constant. The value code is discarded once run, allowing it to be garbage collected.
Deferring a calculation is good if it might take a lot of work or produce a big result but is only needed sometimes or only well into a program run. If it's never needed then the value code never runs.
A deferred constant is generally not inlined or folded (see "Constant Folding" in perlop) since it's not a single scalar value. In the current implementation a deferred constant becomes a plain constant after the first use, so may inline etc in code compiled after that (see "IMPLEMENTATION" below).
In the other systems
The newest version among them is 6, as upstream numbers it.
| System | Port | Version | Vulnerabilities | Status | Maintainer | Last update |
|---|---|---|---|---|---|---|
| FreeBSD | devel/p5-constant-defer | 6 newest | none known | - | [email protected] | - |
| NetBSD | devel/p5-constant-defer | 6nb5 newest | none known | - | [email protected] | 2026-07-16 |
| DragonFly | devel/p5-constant-defer | 6 newest | none known | - | [email protected] | - |
| HardenedBSD | devel/p5-constant-defer | 6 newest | no data | - | [email protected] | - |
| GhostBSD | devel/p5-constant-defer | 6 newest | no data | - | [email protected] | - |
Install
Binary package:
pkg install p5-constant-defer
From the ports tree:
cd /usr/ports/devel/p5-constant-defer/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= p5-constant-defer>0:devel/p5-constant-defer
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 6 | 6 | 6 | 6 | 6 |
| FreeBSD:14:quarterly | 6 | 6 | n/a | 6 | 6 |
| FreeBSD:15:latest | 6 | 6 | n/a | 6 | 6 |
| FreeBSD:15:quarterly | 6 | 6 | n/a | n/a | n/a |
| FreeBSD:16:latest | 6 | 6 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependency graph
Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.
Dependencies
The Makefile names none itself; they come from USES and USE_*.
The full lists below include those, and their dependencies in turn.
Build dependencies 1
Run dependencies 1
Configuration
No options to configure.
- USES
- perl5
- Service scripts
- none
Files
pkg-plist 2
- %%SITE_PERL%%/constant/defer.pm
- %%PERL5_MAN3%%/constant::defer.3.gz
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| constant-defer-6.tar.gz | 43427 | 7b21263198ca22686efff3ae987a240be423dd2160afdeb29fe716d032986ffa |
Master sites 1
- CPAN
Commit history 0
No commits in the history this site was built from.