1Config::Generator::RandUosme(r3)Contributed Perl DocumenCtoantfiiogn::Generator::Random(3)
2
3
4
6 Config::Generator::Random - Config::Generator pseudo-random support
7
9 This module eases the generation of pseudo-random "data". The goal is
10 to be able to generate random but reproducible data, for instance to
11 smear times in crontabs.
12
13 The initial seed usually comes from a file named "random.bin" that can
14 be created with something like:
15
16 $ dd if=/dev/urandom of=random.bin bs=512 count=1
17
18 Then, modules can use the random_seed() function to make sure that what
19 they generate is different from what other modules generate.
20
21 Finally, modules can use the random_integer() function to generate
22 reproducible pseudo-random integers.
23
25 This module provides the following functions (none of them being
26 exported by default):
27
28 random_init([PATH])
29 initialize the pseudo-random generator with the content of the
30 given file or by using a file named "random.bin" if it can be
31 located via the usual include path (the @IncPath variable of the
32 Config::Generator module)
33
34 random_integer(N, DATA...)
35 return a pseudo-random integer between 0 and N-1, using the given
36 DATA for additional seeding
37
38 random_seed(DATA)
39 add the given DATA to the initial seed used by the pseudo-random
40 generator
41
43 Lionel Cons <http://cern.ch/lionel.cons>
44
45 Copyright (C) CERN 2013-2016
46
47
48
49perl v5.36.0 2022-07-22 Config::Generator::Random(3)