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:
random.bin
$ 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.bin if it can be located via the usual include path (the @IncPath variable of the Config::Generator module)
@IncPath
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
To install Config::Generator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Generator
CPAN shell
perl -MCPAN -e shell install Config::Generator
For more information on module installation, please visit the detailed CPAN module installation guide.