Dynamic Loading

The basic idea of dynamic loading is that your program decides at runtime that it needs more functionality than what’s currently available, so it loads it up and keeps running. You can always dynamically load Perl code, but it’s more interesting to dynamically load a binary extension.[397] This is how non-Perl modules are made.

[397] Dynamic loading of binary extensions is available if your system supports that. If it doesn’t, you can compile the extensions statically, meaning you can make a Perl binary with the extension built-in, ready for use.

Get Learning Perl, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.