"be consistent" | |
PerlMonks |
Re: randfunc in Configby Cow1337killr (Monk) |
on Jun 28, 2016 at 04:32 UTC ( [id://1166716]=note: print w/replies, xml ) | Need Help?? |
I don't think there is a foolproof method to check that Perl uses its own drand48 function. It appears that $Config{randfunc} contains the name of the random function used to build the Perl version on your box. Is there a way to lie to the poor Perl? Of course, there is. Just wave a twenty dollar bill in front of a hacker in a dark room. He will list half a dozen different ways to do it. I scanned for drand48 in all the files in C:\Strawberry, the directory that holds my Strawberry Perl installation on my computer (with a Windows operating system). One of the files found was C:\Strawberry\perl\bin\perl524.dll. I am pretty sure that is the dll that gets run when I run perl from the command line. Maybe the "drand48" that it found in there is a decoy. I doubt it. (I just installed Strawberry Perl last week, by the way.) Just to be clear, there is NO file in my C:\Strawberry directory with drand48 as part of the name. With my limited knowledge of systems programming, that tells me that the executable code is embedded in C:\Strawberry\perl\bin\perl524.dll (that I mentioned above). I have poked around and I can think of no easy way to get Perl or the operating system to reveal that Perl_drand48 is being called. (Obviously, an operating system dependent recipe is not desirable.)
In Section
Seekers of Perl Wisdom
|
|