libtest-mockrandom-perl - module to replace random number generation with non-random number generation

Distribution: Debian 8 (Jessie)
Repository: Debian Main amd64
Package name: libtest-mockrandom-perl
Package version: 1.01
Package release: 1
Package architecture: all
Package type: deb
Installed size: 73 B
Download size: 17.72 KB
Official Mirror:
The Test::MockRandom module replaces random number generation with non-random number generation. 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.




    Source package: libtest-mockrandom-perl

    Install Howto

    1. Update the package index:
      # sudo apt-get update
    2. Install libtest-mockrandom-perl deb package:
      # sudo apt-get install libtest-mockrandom-perl


    • /usr/share/doc/libtest-mockrandom-perl/CONTRIBUTING
    • /usr/share/doc/libtest-mockrandom-perl/changelog.Debian.gz
    • /usr/share/doc/libtest-mockrandom-perl/changelog.gz
    • /usr/share/doc/libtest-mockrandom-perl/copyright
    • /usr/share/man/man3/Test::MockRandom.3pm.gz
    • /usr/share/perl5/Test/


    2014-02-13 - Salvatore Bonaccorso <> libtest-mockrandom-perl (1.01-1) unstable; urgency=medium [ Salvatore Bonaccorso ] * debian/watch: Update to ignore development releases. [ gregor herrmann ] * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser field (source stanza). [ Salvatore Bonaccorso ] * debian/control: Changed: Replace versioned (build-)dependency on perl (>= 5.6.0-{12,16}) with an unversioned dependency on perl (as permitted by Debian Policy 3.8.3). [ gregor herrmann ] * debian/control: Changed: (build-)depend on perl instead of perl- modules. [ Salvatore Bonaccorso ] * Email change: Salvatore Bonaccorso -> [ gregor herrmann ] * Remove alternative (build) dependencies that are already satisfied in oldstable. [ Ansgar Burchardt ] * debian/control: Convert Vcs-* fields to Git. [ Salvatore Bonaccorso ] * Change Vcs-Git to canonical URI (git:// * Change based URIs to based URIs [ Axel Beckert ] * debian/copyright: migrate pre-1.0 format to 1.0 using "cme fix dpkg- copyright" [ Salvatore Bonaccorso ] * Imported Upstream version 1.01 * Update copyright years for upstream files * Update copyright years for debian/* packaging files * Refresh License stanza for Apache-2.0. Drop use of X-Comment field. Refer to Debian systems in general instead of only Debian GNU/Linux systems. * Referesh License stanza for Artistic license. Drop use of X-Comment field. Refer to Debian systems in general instead of only Debian GNU/Linux systems. * Refresh License stanza for GPL-1+ Drop use of X-Comment field. Refer to Debian systems in general instead of only Debian GNU/Linux systems. Explicitly refer to GPL-1 license text in /usr/share/common-licenses. * Bump Debhelper compat level to 8. Adjust versioned Build-Depends on debhelper to (>= 8). * Refresh docs to install to /usr/share/doc/libtest-mockrandom-perl. Don't install Todo (removed upstream) and install CONTRIBUTING into doc directory. * Declare compliance with Debian Policy 3.9.5 * Convert package to '3.0 (quilt)' source package format

    2009-05-31 - Salvatore Bonaccorso <> libtest-mockrandom-perl (1.00-1) unstable; urgency=low * Initial Release (Closes: #531200).