Config::Generator::Random - Config::Generator pseudo-random support
This module eases the generation of pseudo-random "data". The goal is to be able to generate random but reproducible data, for instance to smear times in crontabs.
The initial seed usually comes from a file named
random.bin that can be created with something like:
$ dd if=/dev/urandom of=random.bin bs=512 count=1
Then, modules can use the random_seed() function to make sure that what they generate is different from what other modules generate.
Finally, modules can use the random_integer() function to generate reproducible pseudo-random integers.
This module provides the following functions (none of them being exported by default):
initialize the pseudo-random generator with the content of the given file or by using a file named
random.binif it can be located via the usual include path (the
@IncPathvariable of the Config::Generator module)
- random_integer(N, DATA...)
return a pseudo-random integer between 0 and N-1, using the given DATA for additional seeding
add the given DATA to the initial seed used by the pseudo-random generator
Lionel Cons http://cern.ch/lionel.cons
Copyright (C) CERN 2013-2014