Up to [cvs.NetBSD.org] / pkgsrc / devel / p5-constant-defer
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.3 / (download) - annotate - [select for diffs], Thu Jul 6 09:40:27 2023 UTC (5 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2023Q3-base,
pkgsrc-2023Q3,
HEAD
Changes since 1.2: +2 -2
lines
Diff to previous 1.2 (colored)
*: recursive bump for perl 5.38
Revision 1.2 / (download) - annotate - [select for diffs], Tue Jun 28 11:33:38 2022 UTC (17 months, 1 week ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2023Q2-base,
pkgsrc-2023Q2,
pkgsrc-2023Q1-base,
pkgsrc-2023Q1,
pkgsrc-2022Q4-base,
pkgsrc-2022Q4,
pkgsrc-2022Q3-base,
pkgsrc-2022Q3
Changes since 1.1: +2 -1
lines
Diff to previous 1.1 (colored)
*: recursive bump for perl 5.36
Revision 1.1 / (download) - annotate - [select for diffs], Tue May 31 20:49:09 2022 UTC (18 months, 1 week ago) by markd
Branch: MAIN
CVS Tags: pkgsrc-2022Q2-base,
pkgsrc-2022Q2
p5-constant-defer: add version 6 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.