Could you override the built in srand and rand functions with one of your own that checks who the caller is, and chooses which source of randomness to use based on the caller.
This sounds like a guide "how to make my code highly interconnected, and harder to reuse".
The point of encapsulation is that code should not care where it's called from.
Changing the code that reads non-deterministic pseudo random numbers to use Math::Random::MT or something similar would be much saner.
In reply to Re^2: Legacy code uses "srand()" .. how to avoid losing entropy?
by moritz
in thread Legacy code uses "srand()" .. how to avoid losing entropy?
by locked_user sundialsvc4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |