From tjs@Pluto.CDPA.nsysu.edu.tw  Sun Jul 23 14:19:27 2006
Return-Path: <tjs@Pluto.CDPA.nsysu.edu.tw>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D2D0716A4DD
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Jul 2006 14:19:27 +0000 (UTC)
	(envelope-from tjs@Pluto.CDPA.nsysu.edu.tw)
Received: from Pluto.CDPA.nsysu.edu.tw (Pluto.CDPA.nsysu.edu.tw [140.117.205.30])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 694B243D49
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Jul 2006 14:19:27 +0000 (GMT)
	(envelope-from tjs@Pluto.CDPA.nsysu.edu.tw)
Received: from Pluto.CDPA.nsysu.edu.tw (localhost [127.0.0.1])
	by Pluto.CDPA.nsysu.edu.tw (8.13.6/8.13.6) with ESMTP id k6NEJM3a003156
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Jul 2006 22:19:22 +0800 (CST)
	(envelope-from tjs@Pluto.CDPA.nsysu.edu.tw)
Received: (from root@localhost)
	by Pluto.CDPA.nsysu.edu.tw (8.13.6/8.13.6/Submit) id k6NEJMOi003155;
	Sun, 23 Jul 2006 22:19:22 +0800 (CST)
	(envelope-from tjs)
Message-Id: <200607231419.k6NEJMOi003155@Pluto.CDPA.nsysu.edu.tw>
Date: Sun, 23 Jul 2006 22:19:22 +0800 (CST)
From: tjs <tjs@cdpa.nsysu.edu.tw>
Reply-To: Jin-Shan Tseng <tjs@cdpa.nsysu.edu.tw>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: New port: devel/p5-Test-MockRandom Replaces random number generation with non-random number generation
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         100749
>Category:       ports
>Synopsis:       New port: devel/p5-Test-MockRandom Replaces random number generation with non-random number generation
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ehaupt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 23 14:20:09 GMT 2006
>Closed-Date:    Tue Jul 25 23:00:14 CEST 2006
>Last-Modified:  Tue Jul 25 23:00:14 CEST 2006
>Originator:     Jin-Shan Tseng
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
NCHC
>Environment:
System: FreeBSD Pluto.CDPA.nsysu.edu.tw 6.1-STABLE FreeBSD 6.1-STABLE #0: Mon Jul 17 12:45:19 CST 2006 tjs@Pluto.CDPA.nsysu.edu.tw:/usr/obj/usr/src/sys/Pluto i386


>Description:

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. See "USAGE" for details.

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/

>How-To-Repeat:
>Fix:


--- p5-Test-MockRandom.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	p5-Test-MockRandom
#	p5-Test-MockRandom/Makefile
#	p5-Test-MockRandom/distinfo
#	p5-Test-MockRandom/pkg-descr
#	p5-Test-MockRandom/pkg-plist
#
echo c - p5-Test-MockRandom
mkdir -p p5-Test-MockRandom > /dev/null 2>&1
echo x - p5-Test-MockRandom/Makefile
sed 's/^X//' >p5-Test-MockRandom/Makefile << 'END-of-p5-Test-MockRandom/Makefile'
X# New Ports Collection Makefile for:	p5-Test-MockRandom
X# Date created:				2006-07-23
X# Whom:					Jin-Shan Tseng <tjs@cdpa.nsysu.edu.tw>
X# $FreeBSD$
X
XPORTNAME=	Test-MockRandom
XPORTVERSION=	0.99
XCATEGORIES=	devel perl5
XMASTER_SITES=	${MASTER_SITE_PERL_CPAN}
XMASTER_SITE_SUBDIR=	Test
XPKGNAMEPREFIX=	p5-
X
XMAINTAINER=	tjs@cdpa.nsysu.edu.tw
XCOMMENT=	Replaces random number generation with non-random number generation
X
XBUILD_DEPENDS=	${SITE_PERL}/Module/Build.pm:${PORTSDIR}/devel/p5-Module-Build
X
XPERL_CONFIGURE=	yes
X
XMAN3=		Test::MockRandom.3
X
X.include <bsd.port.mk>
END-of-p5-Test-MockRandom/Makefile
echo x - p5-Test-MockRandom/distinfo
sed 's/^X//' >p5-Test-MockRandom/distinfo << 'END-of-p5-Test-MockRandom/distinfo'
XMD5 (Test-MockRandom-0.99.tar.gz) = 8852d9674c670d8309064c98f7b3e2a5
XSHA256 (Test-MockRandom-0.99.tar.gz) = 0978a6ddea5cfa76f22b1c1732020d7f8d4b5cf06246085442f9c96568dc226e
XSIZE (Test-MockRandom-0.99.tar.gz) = 17649
END-of-p5-Test-MockRandom/distinfo
echo x - p5-Test-MockRandom/pkg-descr
sed 's/^X//' >p5-Test-MockRandom/pkg-descr << 'END-of-p5-Test-MockRandom/pkg-descr'
XThis perhaps ridiculous-seeming module was created to test
Xroutines that manipulate random numbers by providing a known
Xoutput from rand. Given a list of seeds with srand, it will
Xreturn each in turn. After seeded random numbers are
Xexhausted, it will always return 0. Seed numbers must be of
Xa form that meets the expected output from rand as called
Xwith no arguments -- i.e. they must be between 0 (inclusive)
Xand 1 (exclusive). In order to facilitate generating and
Xtesting a nearly-one number, this module exports the function
Xoneish, which returns a number just fractionally less than one.
X
XDepending on how this module is called with use, it will
Xexport rand to a specified package (e.g. a class being tested)
Xeffectively overriding and intercepting calls in that package
Xto the built-in rand. It can also override rand in the current
Xpackage or even globally. In all of these cases, it also
Xexports srand and oneish to the current package in order to
Xcontrol the output of rand. See "USAGE" for details.
X
XAlternatively, this module can be used to generate objects,
Xwith each object maintaining its own distinct seed array.
X
XWWW:	http://search.cpan.org/dist/Test-MockRandom/
END-of-p5-Test-MockRandom/pkg-descr
echo x - p5-Test-MockRandom/pkg-plist
sed 's/^X//' >p5-Test-MockRandom/pkg-plist << 'END-of-p5-Test-MockRandom/pkg-plist'
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/MockRandom/.packlist
X%%SITE_PERL%%/Test/MockRandom.pm
X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/MockRandom
X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test
X@dirrmtry %%SITE_PERL%%/Test
END-of-p5-Test-MockRandom/pkg-plist
exit
--- p5-Test-MockRandom.shar ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ehaupt 
Responsible-Changed-By: ehaupt 
Responsible-Changed-When: Mon Jul 24 11:32:59 CEST 2006 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100749 
State-Changed-From-To: open->closed 
State-Changed-By: ehaupt 
State-Changed-When: Tue Jul 25 23:00:10 CEST 2006 
State-Changed-Why:  
New port added. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100749 
>Unformatted:
