aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-Test-MockRandom
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2006-07-25 20:58:24 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2006-07-25 20:58:24 +0000
commit81f9983ba43c9330dbd7983d68e9635ee50daa6b (patch)
treecf1152072e6519753a4389af3dc783b9e5892c8e /devel/p5-Test-MockRandom
parent225db5a61bbcb196ad98e924ead81dfa18d9c6fa (diff)
downloadports-81f9983ba43c9330dbd7983d68e9635ee50daa6b.tar.gz
ports-81f9983ba43c9330dbd7983d68e9635ee50daa6b.zip
Notes
Diffstat (limited to 'devel/p5-Test-MockRandom')
-rw-r--r--devel/p5-Test-MockRandom/Makefile22
-rw-r--r--devel/p5-Test-MockRandom/distinfo3
-rw-r--r--devel/p5-Test-MockRandom/pkg-descr20
-rw-r--r--devel/p5-Test-MockRandom/pkg-plist5
4 files changed, 50 insertions, 0 deletions
diff --git a/devel/p5-Test-MockRandom/Makefile b/devel/p5-Test-MockRandom/Makefile
new file mode 100644
index 000000000000..ceace55f991d
--- /dev/null
+++ b/devel/p5-Test-MockRandom/Makefile
@@ -0,0 +1,22 @@
+# New Ports Collection Makefile for: p5-Test-MockRandom
+# Date created: 2006-07-23
+# Whom: Jin-Shan Tseng <tjs@cdpa.nsysu.edu.tw>
+# $FreeBSD$
+
+PORTNAME= Test-MockRandom
+PORTVERSION= 0.99
+CATEGORIES= devel perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= Test
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= tjs@cdpa.nsysu.edu.tw
+COMMENT= Replaces random number generation with non-random number generation
+
+BUILD_DEPENDS= ${SITE_PERL}/Module/Build.pm:${PORTSDIR}/devel/p5-Module-Build
+
+PERL_CONFIGURE= yes
+
+MAN3= Test::MockRandom.3
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Test-MockRandom/distinfo b/devel/p5-Test-MockRandom/distinfo
new file mode 100644
index 000000000000..4d89f4d7f78d
--- /dev/null
+++ b/devel/p5-Test-MockRandom/distinfo
@@ -0,0 +1,3 @@
+MD5 (Test-MockRandom-0.99.tar.gz) = 8852d9674c670d8309064c98f7b3e2a5
+SHA256 (Test-MockRandom-0.99.tar.gz) = 0978a6ddea5cfa76f22b1c1732020d7f8d4b5cf06246085442f9c96568dc226e
+SIZE (Test-MockRandom-0.99.tar.gz) = 17649
diff --git a/devel/p5-Test-MockRandom/pkg-descr b/devel/p5-Test-MockRandom/pkg-descr
new file mode 100644
index 000000000000..88e06ce89183
--- /dev/null
+++ b/devel/p5-Test-MockRandom/pkg-descr
@@ -0,0 +1,20 @@
+This perhaps ridiculous-seeming module was created to test routines that
+manipulate random numbers by providing a known output from rand. Given a list of
+seeds with srand, it will return each in turn. After seeded random numbers are
+exhausted, it will always return 0. Seed numbers must be of a form that meets
+the expected output from rand as called with no arguments -- i.e. they must be
+between 0 (inclusive) and 1 (exclusive). In order to facilitate generating and
+testing a nearly-one number, this module exports the function oneish, which
+returns a number just fractionally less than one.
+
+Depending on how this module is called with use, it will export rand to a
+specified package (e.g. a class being tested) effectively overriding and
+intercepting calls in that package to the built-in rand. It can also override
+rand in the current package or even globally. In all of these cases, it also
+exports srand and oneish to the current package in order to control the output
+of rand.
+
+Alternatively, this module can be used to generate objects, with each object
+maintaining its own distinct seed array.
+
+WWW: http://search.cpan.org/dist/Test-MockRandom/
diff --git a/devel/p5-Test-MockRandom/pkg-plist b/devel/p5-Test-MockRandom/pkg-plist
new file mode 100644
index 000000000000..f2ffa9960c52
--- /dev/null
+++ b/devel/p5-Test-MockRandom/pkg-plist
@@ -0,0 +1,5 @@
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/MockRandom/.packlist
+%%SITE_PERL%%/Test/MockRandom.pm
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/MockRandom
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test
+@dirrmtry %%SITE_PERL%%/Test