git: a304d68eeb58 - main - devel/p5-Test2-Tools-MemoryCycle: Add p5-Test2-Tools-MemoryCycle 0.01

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 03 Oct 2022 17:12:23 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a304d68eeb584c13ac88e3a0bb12619e82e02cb7

commit a304d68eeb584c13ac88e3a0bb12619e82e02cb7
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-10-03 16:56:34 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-10-03 17:10:13 +0000

    devel/p5-Test2-Tools-MemoryCycle: Add p5-Test2-Tools-MemoryCycle 0.01
    
    Perl's garbage collection has one big problem: Circular references can't get
    cleaned up. The above example is the sort of thing that sometimes trips me up,
    where a code reference inside a data structure refers to another part of the
    data structure. There already exists a good testing module to find these sort of
    problems: Test::Memory::Cycle, so why write this one? Well that module uses
    Test::Builder, and this one instead uses Test2::API. If you want to write
    Test2::Suite tests without pulling in Test::Builder then this is the cycle
    testing module for you.
    
    Test2::Tools::MemoryCycle also uses the standard Exporter interface, instead of
    letting you specify a test plan. That behavior was once in vogue I guess, but I
    do not care for it.
---
 devel/Makefile                             |  1 +
 devel/p5-Test2-Tools-MemoryCycle/Makefile  | 26 ++++++++++++++++++++++++++
 devel/p5-Test2-Tools-MemoryCycle/distinfo  |  3 +++
 devel/p5-Test2-Tools-MemoryCycle/pkg-descr | 12 ++++++++++++
 devel/p5-Test2-Tools-MemoryCycle/pkg-plist |  2 ++
 5 files changed, 44 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index dbe5c0e81b10..d6e214a2d6af 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -3562,6 +3562,7 @@
     SUBDIR += p5-Test2-Suite
     SUBDIR += p5-Test2-Tools-Explain
     SUBDIR += p5-Test2-Tools-FFI
+    SUBDIR += p5-Test2-Tools-MemoryCycle
     SUBDIR += p5-Text-Levenshtein
     SUBDIR += p5-Text-Levenshtein-Damerau
     SUBDIR += p5-Text-LevenshteinXS
diff --git a/devel/p5-Test2-Tools-MemoryCycle/Makefile b/devel/p5-Test2-Tools-MemoryCycle/Makefile
new file mode 100644
index 000000000000..31c9e97485c4
--- /dev/null
+++ b/devel/p5-Test2-Tools-MemoryCycle/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	Test2-Tools-MemoryCycle
+PORTVERSION=	0.01
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+MASTER_SITE_SUBDIR=	CPAN:PLICEASE
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Check for memory leaks and circular memory references
+WWW=		https://metacpan.org/dist/Test2-Tools-MemoryCycle
+
+LICENSE=	ART10 GPLv1+
+LICENSE_COMB=	dual
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${RUN_DEPENDS}
+RUN_DEPENDS=	p5-Devel-Cycle>=0:devel/p5-Devel-Cycle \
+		p5-PadWalker>=1.0:devel/p5-PadWalker
+TEST_DEPENDS=	p5-Test2-Suite>=0.000121:devel/p5-Test2-Suite
+
+USES=		perl5
+USE_PERL5=	configure
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Test2-Tools-MemoryCycle/distinfo b/devel/p5-Test2-Tools-MemoryCycle/distinfo
new file mode 100644
index 000000000000..5a8c300f94cf
--- /dev/null
+++ b/devel/p5-Test2-Tools-MemoryCycle/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1664767802
+SHA256 (Test2-Tools-MemoryCycle-0.01.tar.gz) = 535b3dca542a33251512ade4b5a7dbebe3c448d83f880d198e43dc127979698b
+SIZE (Test2-Tools-MemoryCycle-0.01.tar.gz) = 16292
diff --git a/devel/p5-Test2-Tools-MemoryCycle/pkg-descr b/devel/p5-Test2-Tools-MemoryCycle/pkg-descr
new file mode 100644
index 000000000000..f61706006289
--- /dev/null
+++ b/devel/p5-Test2-Tools-MemoryCycle/pkg-descr
@@ -0,0 +1,12 @@
+Perl's garbage collection has one big problem: Circular references can't get
+cleaned up. The above example is the sort of thing that sometimes trips me up,
+where a code reference inside a data structure refers to another part of the
+data structure. There already exists a good testing module to find these sort of
+problems: Test::Memory::Cycle, so why write this one? Well that module uses
+Test::Builder, and this one instead uses Test2::API. If you want to write
+Test2::Suite tests without pulling in Test::Builder then this is the cycle
+testing module for you.
+
+Test2::Tools::MemoryCycle also uses the standard Exporter interface, instead of
+letting you specify a test plan. That behavior was once in vogue I guess, but I
+do not care for it.
diff --git a/devel/p5-Test2-Tools-MemoryCycle/pkg-plist b/devel/p5-Test2-Tools-MemoryCycle/pkg-plist
new file mode 100644
index 000000000000..a9e18c1d2260
--- /dev/null
+++ b/devel/p5-Test2-Tools-MemoryCycle/pkg-plist
@@ -0,0 +1,2 @@
+%%SITE_PERL%%/Test2/Tools/MemoryCycle.pm
+%%PERL5_MAN3%%/Test2::Tools::MemoryCycle.3.gz