aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-Test-use-ok
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2006-03-26 21:20:53 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2006-03-26 21:20:53 +0000
commit587372a0c501dfd2853d458e3ffb02f0cb73d9d7 (patch)
treeee9935cd404220d2d4f53b462ff0fe7b4c7aa142 /devel/p5-Test-use-ok
parent9014178e937b0837e956413bd6c30d5db62fe2a9 (diff)
downloadports-587372a0c501dfd2853d458e3ffb02f0cb73d9d7.tar.gz
ports-587372a0c501dfd2853d458e3ffb02f0cb73d9d7.zip
Notes
Diffstat (limited to 'devel/p5-Test-use-ok')
-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
4 files changed, 63 insertions, 0 deletions
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