Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Need help using Inline::Module with JavaScript::Embedded

by harangzsolt33 (Chaplain)
on Jul 13, 2022 at 18:38 UTC ( [id://11145500]=note: print w/replies, xml ) Need Help??


in reply to Re: Need help using Inline::Module with JavaScript::Embedded
in thread Need help using Inline::Module with JavaScript::Embedded

When the test suite is run for the first time, Inline::C performs its required compilation before the tests run. When the test suite is run for the second time, no compilation is done and the existing compiled binaries are used.

Sorry for the slightly off-topic questions ahead, but I am still a beginner, learning Perl.

So, I want to understand this a little bit better. So, when inline C is used, the compiler saves the binaries. How does Perl know not to compile it again? And where does the compiler save the binaries when done? Is it in /tmp/ramdisk or is there a specific directory for Perl inline C binaries? How are these binaries named? Are they given random names?

  • Comment on Re^2: Need help using Inline::Module with JavaScript::Embedded

Replies are listed 'Best First'.
Re^3: Need help using Inline::Module with JavaScript::Embedded
by haukex (Archbishop) on Jul 13, 2022 at 20:04 UTC
      Thank you for pointing me in the right direction. That answered my questions.
Re^3: Need help using Inline::Module with JavaScript::Embedded
by syphilis (Archbishop) on Jul 14, 2022 at 14:34 UTC
    In brief:

    How does Perl know not to compile it again?

    Any change to the C code (including changes affecting only whitespace) will be detected as a change to the MD5 fingerprint, and the code will only then be recompiled.
    Changes to Inline configuration options will not alone trigger a rebuild - unless it's the FORCE_BUILD option that is being changed to a TRUE value.

    And where does the compiler save the binaries when done?

    Generally the building is done in ./_Inline/build and the binaries saved in ./_Inline/lib, but the name of the parent directory is configurable.

    How are these binaries named?

    A combination of the filename of the script, and the leading hex digits of the MD5 fingerprint of the code section.

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11145500]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-20 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found