perl-Test-MockRandom - Override randoms with non-random behavior

Property Value
Distribution ROSA 2016.1
Repository ROSA Main Updates x86_64
Package name perl-Test-MockRandom
Package version 1.10.0
Package release 6-rosa2016.1
Package architecture noarch
Package type rpm
Installed size 51.47 KB
Download size 22.65 KB
Official Mirror
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 the /USAGE manpage for details.
Alternatively, this module can be used to generate objects, with each
object maintaining its own distinct seed array.


Package Version Architecture Repository
perl-Test-MockRandom-1.10.0-6-rosa2016.1.noarch.rpm 1.10.0 noarch ROSA Main Updates
perl-Test-MockRandom-1.10.0-5-rosa2016.1.noarch.rpm 1.10.0 noarch ROSA Contrib
perl-Test-MockRandom-1.10.0-5-rosa2016.1.noarch.rpm 1.10.0 noarch ROSA Contrib
perl-Test-MockRandom - - -


Name Value
perl(Carp) -
perl(abi) >= 5.20.3


Name Value
perl(Test::MockRandom) == 1.10.0
perl-Test-MockRandom == 1.10.0-6:2016.1


Type URL
Binary Package perl-Test-MockRandom-1.10.0-6-rosa2016.1.noarch.rpm
Source Package perl-Test-MockRandom-1.10.0-6.src.rpm

Install Howto

  1. Enable ROSA Main Updates repository on Install and Remove Software
  2. Update packages list:
    # urpmi.update -a
  3. Install perl-Test-MockRandom rpm package:
    # urpmi perl-Test-MockRandom




2017-06-27 - Denis Silakov <> 1.10.0-6
- (dc025c9) Move to main

See Also

Package Description
perl-Test-Needs-0.2.5-1-rosa2016.1.noarch.rpm Skip tests when modules not available
perl-Test-Object-0.80.0-1-rosa2016.1.noarch.rpm Thoroughly testing objects via registered handlers
perl-Test-Pod-1.520.0-1-rosa2016.1.noarch.rpm Check for POD errors in files
perl-Test-Script-1.180.0-1-rosa2016.1.noarch.rpm Cross-platform basic tests for scripts
perl-Test-Simple-1.302.85-1-rosa2016.1.noarch.rpm Basic utilities for writing tests
perl-Test-SubCalls-1.100.0-1-rosa2016.1.noarch.rpm Track the number of times subs are called
perl-Test-utf8-1.10.0-5-rosa2016.1.noarch.rpm Handy utf8 tests
perl-Text-Glob-0.110.0-1-rosa2016.1.noarch.rpm Match globbing patterns against text
perl-Text-Unidecode-1.300.0-1-rosa2016.1.noarch.rpm Represent Unicode data in US-ASCII characters
perl-Tk-804.34.0-1-rosa2016.1.x86_64.rpm Tk modules for Perl
perl-Tk-devel-804.34.0-1-rosa2016.1.x86_64.rpm Tk modules for Perl (development package)
perl-Tk-doc-804.34.0-1-rosa2016.1.x86_64.rpm Tk modules for Perl (documentation package)
perl-Tree-DAG_Node-1.310.0-1-rosa2016.1.noarch.rpm Class for representing nodes in a tre
perl-URI-1.740.0-1-rosa2016.1.noarch.rpm URI module for perl
perl-Unicode-LineBreak-2017.4.0-1-rosa2016.1.x86_64.rpm UAX