Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Apr 2015 12:28:07 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r384782 - in head/devel: . p5-constant-defer
Message-ID:  <201504261228.t3QCS7EV001098@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Sun Apr 26 12:28:06 2015
New Revision: 384782
URL: https://svnweb.freebsd.org/changeset/ports/384782

Log:
  - Add p5-constant-defer 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.
  
  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).
  
  WWW: http://search.cpan.org/dist/constant-defer/

Added:
  head/devel/p5-constant-defer/
  head/devel/p5-constant-defer/Makefile   (contents, props changed)
  head/devel/p5-constant-defer/distinfo   (contents, props changed)
  head/devel/p5-constant-defer/pkg-descr   (contents, props changed)
  head/devel/p5-constant-defer/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Sun Apr 26 12:28:00 2015	(r384781)
+++ head/devel/Makefile	Sun Apr 26 12:28:06 2015	(r384782)
@@ -3239,6 +3239,7 @@
     SUBDIR += p5-constant
     SUBDIR += p5-constant-boolean
     SUBDIR += p5-constant-def
+    SUBDIR += p5-constant-defer
     SUBDIR += p5-constant-lexical
     SUBDIR += p5-cpan-listchanges
     SUBDIR += p5-enum

Added: head/devel/p5-constant-defer/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/p5-constant-defer/Makefile	Sun Apr 26 12:28:06 2015	(r384782)
@@ -0,0 +1,18 @@
+# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	constant-defer
+PORTVERSION=	6
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Constant subs with deferred value calculation
+
+LICENSE=	GPLv3
+
+USE_PERL5=	configure
+USES=		perl5
+
+.include <bsd.port.mk>

Added: head/devel/p5-constant-defer/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/p5-constant-defer/distinfo	Sun Apr 26 12:28:06 2015	(r384782)
@@ -0,0 +1,2 @@
+SHA256 (constant-defer-6.tar.gz) = 7b21263198ca22686efff3ae987a240be423dd2160afdeb29fe716d032986ffa
+SIZE (constant-defer-6.tar.gz) = 43427

Added: head/devel/p5-constant-defer/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/p5-constant-defer/pkg-descr	Sun Apr 26 12:28:06 2015	(r384782)
@@ -0,0 +1,15 @@
+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).
+
+WWW: http://search.cpan.org/dist/constant-defer/

Added: head/devel/p5-constant-defer/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/p5-constant-defer/pkg-plist	Sun Apr 26 12:28:06 2015	(r384782)
@@ -0,0 +1,2 @@
+%%SITE_PERL%%/constant/defer.pm
+%%PERL5_MAN3%%/constant::defer.3.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504261228.t3QCS7EV001098>