devel/p5-constant-defer 6 DragonFly
Constant subs with deferred value calculation
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- GPLv3
- Categories
- devel, perl5
- Package size
- 22.4 KiB, 54.1 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 |
|---|---|---|---|---|---|---|
| DragonFly | devel/p5-constant-defer | 6 newest | none known | - | [email protected] | - |
| 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 |
| 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 DPorts:
cd /usr/dports/devel/p5-constant-defer && make install clean
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.