in reply to PDL and srand puzzle
Thirdly, I wondered how one might protect oneself from such a trap.
Explicitly lists your imports. This has the huge added benefit that it's easy to see from where each sub originates.
You could also use CORE::srand.