Tue May 31 20:49:09 2022 UTC ()
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.
(markd)
diff -r1.3742 -r1.3743 pkgsrc/devel/Makefile
diff -r0 -r1.1 pkgsrc/devel/p5-constant-defer/DESCR
diff -r0 -r1.1 pkgsrc/devel/p5-constant-defer/Makefile
diff -r0 -r1.1 pkgsrc/devel/p5-constant-defer/distinfo
--- pkgsrc/devel/Makefile 2022/05/24 05:54:01 1.3742
+++ pkgsrc/devel/Makefile 2022/05/31 20:49:09 1.3743
| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.3742 2022/05/24 05:54:01 wiz Exp $ | | 1 | # $NetBSD: Makefile,v 1.3743 2022/05/31 20:49:09 markd Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | COMMENT= Development utilities | | 4 | COMMENT= Development utilities |
5 | | | 5 | |
6 | SUBDIR+= ETL | | 6 | SUBDIR+= ETL |
7 | SUBDIR+= ExmanIDE | | 7 | SUBDIR+= ExmanIDE |
8 | SUBDIR+= GConf | | 8 | SUBDIR+= GConf |
9 | SUBDIR+= GConf-ui | | 9 | SUBDIR+= GConf-ui |
10 | SUBDIR+= Gorm | | 10 | SUBDIR+= Gorm |
11 | SUBDIR+= MoarVM | | 11 | SUBDIR+= MoarVM |
12 | SUBDIR+= ObjectiveLib | | 12 | SUBDIR+= ObjectiveLib |
13 | SUBDIR+= ProjectCenter | | 13 | SUBDIR+= ProjectCenter |
14 | SUBDIR+= R-BH | | 14 | SUBDIR+= R-BH |
| @@ -2166,26 +2166,27 @@ SUBDIR+= p5-XXX | | | @@ -2166,26 +2166,27 @@ SUBDIR+= p5-XXX |
2166 | SUBDIR+= p5-accessors | | 2166 | SUBDIR+= p5-accessors |
2167 | SUBDIR+= p5-accessors-fast | | 2167 | SUBDIR+= p5-accessors-fast |
2168 | SUBDIR+= p5-aliased | | 2168 | SUBDIR+= p5-aliased |
2169 | SUBDIR+= p5-asa | | 2169 | SUBDIR+= p5-asa |
2170 | SUBDIR+= p5-autobox | | 2170 | SUBDIR+= p5-autobox |
2171 | SUBDIR+= p5-autobox-Core | | 2171 | SUBDIR+= p5-autobox-Core |
2172 | SUBDIR+= p5-autovivification | | 2172 | SUBDIR+= p5-autovivification |
2173 | SUBDIR+= p5-bareword-filehandles | | 2173 | SUBDIR+= p5-bareword-filehandles |
2174 | SUBDIR+= p5-boolean | | 2174 | SUBDIR+= p5-boolean |
2175 | SUBDIR+= p5-capitalization | | 2175 | SUBDIR+= p5-capitalization |
2176 | SUBDIR+= p5-circular-require | | 2176 | SUBDIR+= p5-circular-require |
2177 | SUBDIR+= p5-common-sense | | 2177 | SUBDIR+= p5-common-sense |
2178 | SUBDIR+= p5-constant-def | | 2178 | SUBDIR+= p5-constant-def |
| | | 2179 | SUBDIR+= p5-constant-defer |
2179 | SUBDIR+= p5-curry | | 2180 | SUBDIR+= p5-curry |
2180 | SUBDIR+= p5-enum | | 2181 | SUBDIR+= p5-enum |
2181 | SUBDIR+= p5-ex-lib | | 2182 | SUBDIR+= p5-ex-lib |
2182 | SUBDIR+= p5-forks | | 2183 | SUBDIR+= p5-forks |
2183 | SUBDIR+= p5-gettext | | 2184 | SUBDIR+= p5-gettext |
2184 | SUBDIR+= p5-glib2 | | 2185 | SUBDIR+= p5-glib2 |
2185 | SUBDIR+= p5-inc | | 2186 | SUBDIR+= p5-inc |
2186 | SUBDIR+= p5-inc-latest | | 2187 | SUBDIR+= p5-inc-latest |
2187 | SUBDIR+= p5-indirect | | 2188 | SUBDIR+= p5-indirect |
2188 | SUBDIR+= p5-lib-abs | | 2189 | SUBDIR+= p5-lib-abs |
2189 | SUBDIR+= p5-local-lib | | 2190 | SUBDIR+= p5-local-lib |
2190 | SUBDIR+= p5-multidimensional | | 2191 | SUBDIR+= p5-multidimensional |
2191 | SUBDIR+= p5-namespace-autoclean | | 2192 | SUBDIR+= p5-namespace-autoclean |
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.
# $NetBSD: Makefile,v 1.1 2022/05/31 20:49:09 markd Exp $
DISTNAME= constant-defer-6
PKGNAME= p5-${DISTNAME}
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=../../authors/id/K/KR/KRYDE/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://metacpan.org/release/constant-defer
COMMENT= constant subs with deferred value calculation
LICENSE= gnu-gpl-v3
PERL5_PACKLIST= auto/constant/defer/.packlist
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"
$NetBSD: distinfo,v 1.1 2022/05/31 20:49:09 markd Exp $
BLAKE2s (constant-defer-6.tar.gz) = 061fad1a566551a57ca780f4eb77159ed1fc0cdd86882f8d206e93895a64c369
SHA512 (constant-defer-6.tar.gz) = 902916d32ed11737d34f8764af171ba1731de807ffbfd62e342f83bef05ab0a34ddaeec3f2c9b41814877b0568fc3e09fbf26e7ce2cd4a3dd6eeba75e6755b5f
Size (constant-defer-6.tar.gz) = 43427 bytes