./devel/p5-constant-defer, constant subs with deferred value calculation

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 6nb2, Package name: p5-constant-defer-6nb2, Maintainer: pkgsrc-users

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.


Master sites: (Expand)

Filesize: 42.409 KB

Version history: (Expand)


CVS history: (Expand)


   2023-07-06 11:43:03 by Thomas Klausner | Files touched by this commit (2483)
Log message:
*: recursive bump for perl 5.38
   2022-06-28 13:38:00 by Thomas Klausner | Files touched by this commit (3952)
Log message:
*: recursive bump for perl 5.36
   2022-05-31 22:49:09 by Mark Davies | Files touched by this commit (3)
Log message:
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.