aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2006-03-27 05:20:53 +0800
committersem <sem@FreeBSD.org>2006-03-27 05:20:53 +0800
commit5ab4ec06a7fbd8bfd4e2b899e50919b6edb145c2 (patch)
tree7bd72d239d7deb272c375fdce19b0a7aa6a3911e /devel
parent5c903a4c80b3e17733a0bf4b4afc809da84c2ab9 (diff)
downloadfreebsd-ports-gnome-5ab4ec06a7fbd8bfd4e2b899e50919b6edb145c2.tar.gz
freebsd-ports-gnome-5ab4ec06a7fbd8bfd4e2b899e50919b6edb145c2.tar.zst
freebsd-ports-gnome-5ab4ec06a7fbd8bfd4e2b899e50919b6edb145c2.zip
devel/p5-Test-use-ok, Alternative to Test::More::use_ok
PR: ports/94952 Submitted by: Lars Balker Rasmussen <lars@balker.dk>
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/p5-Test-use-ok/Makefile29
-rw-r--r--devel/p5-Test-use-ok/distinfo3
-rw-r--r--devel/p5-Test-use-ok/pkg-descr23
-rw-r--r--devel/p5-Test-use-ok/pkg-plist8
5 files changed, 64 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 1e297e8b0990..ea60750498de 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1227,6 +1227,7 @@
SUBDIR += p5-Test-WWW-Mechanize-Catalyst
SUBDIR += p5-Test-Warn
SUBDIR += p5-Test-XML
+ SUBDIR += p5-Test-use-ok
SUBDIR += p5-Text-LevenshteinXS
SUBDIR += p5-Text-vFile-asData
SUBDIR += p5-Tie-Array-Sorted
diff --git a/devel/p5-Test-use-ok/Makefile b/devel/p5-Test-use-ok/Makefile
new file mode 100644
index 000000000000..488af2c35f0e
--- /dev/null
+++ b/devel/p5-Test-use-ok/Makefile
@@ -0,0 +1,29 @@
+# New ports collection makefile for: devel/p5-Test-use-ok
+# Date created: 26 Mar 2006
+# Whom: Lars Balker Rasmussen <lars@balker.dk>
+#
+# $FreeBSD$
+#
+
+PORTNAME= Test-use-ok
+PORTVERSION= 0.01
+CATEGORIES= devel perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= Test
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= lars@balker.dk
+COMMENT= Alternative to Test::More::use_ok
+
+BUILD_DEPENDS= p5-Test-Simple>=0:${PORTSDIR}/devel/p5-Test-Simple
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+PERL_CONFIGURE= yes
+
+MAN3= Test::use::ok.3 ok.3
+
+.include <bsd.port.pre.mk>
+.if ${PERL_LEVEL} < 500800
+IGNORE= requires perl 5.8.0 or later. Install lang/perl5.8 and try again
+.endif
+.include <bsd.port.post.mk>
diff --git a/devel/p5-Test-use-ok/distinfo b/devel/p5-Test-use-ok/distinfo
new file mode 100644
index 000000000000..9f8486ca80b8
--- /dev/null
+++ b/devel/p5-Test-use-ok/distinfo
@@ -0,0 +1,3 @@
+MD5 (Test-use-ok-0.01.tar.gz) = 57b8f1698b14c7ddef3b35b29ac3326c
+SHA256 (Test-use-ok-0.01.tar.gz) = 354ce1fa05e127d69700b1db810f68834f3e51be25bd058af71e9ce9a8db4cbd
+SIZE (Test-use-ok-0.01.tar.gz) = 8862
diff --git a/devel/p5-Test-use-ok/pkg-descr b/devel/p5-Test-use-ok/pkg-descr
new file mode 100644
index 000000000000..52d9ebea2b29
--- /dev/null
+++ b/devel/p5-Test-use-ok/pkg-descr
@@ -0,0 +1,23 @@
+According to the Test::More documentation, it is recommended to run
+use_ok() inside a BEGIN block, so functions are exported at
+compile-time and prototypes are properly honored.
+
+That is, instead of writing this:
+
+ use_ok( 'Some::Module' );
+ use_ok( 'Other::Module' );
+
+One should write this:
+
+ BEGIN { use_ok( 'Some::Module' ); }
+ BEGIN { use_ok( 'Other::Module' ); }
+
+However, people often either forget to add BEGIN, or mistakenly group
+use_ok with other tests in a single BEGIN block, which can create subtle
+differences in execution order.
+
+With this module, simply change all use_ok in test scripts to use ok,
+and they will be executed at BEGIN time. The explicit space after use
+makes it clear that this is a single compile-time action.
+
+WWW: http://search.cpan.org/dist/Test-use-ok/
diff --git a/devel/p5-Test-use-ok/pkg-plist b/devel/p5-Test-use-ok/pkg-plist
new file mode 100644
index 000000000000..1d0f4ccb237a
--- /dev/null
+++ b/devel/p5-Test-use-ok/pkg-plist
@@ -0,0 +1,8 @@
+%%SITE_PERL%%/Test/use/ok.pm
+%%SITE_PERL%%/ok.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/use/ok/.packlist
+@dirrmtry %%SITE_PERL%%/Test/use
+@dirrmtry %%SITE_PERL%%/Test
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/use/ok
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/use
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test