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 reply to Re: randfunc in Config by Cow1337killr
in thread randfunc in Config by choroba

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.