XSLoader#
Start the native part of a module
VERSION#
Version 0.32, the XSLoader of perl 5.44, unchanged.
SYNOPSIS#
package YourPackage;
require XSLoader;
XSLoader::load(__PACKAGE__, $VERSION);
DESCRIPTION#
XSLoader::load starts the compiled part of a module. The module’s .pm calls it, usually right after setting $VERSION; without arguments it uses the calling package.
Under pperl, XSLoader::load loads no shared object (DynaLoader’s dl_* functions do, for a library a program asks for). Where pperl implements a module natively, the compiled part is in the pperl binary, and XSLoader::load starts it the way perl5 starts an extension linked statically into its binary. That is how the native modules of the module reference load, such as Socket, POSIX, List::Util and Storable: their upstream .pm runs unchanged and calls XSLoader::load.
For a module pperl has no native part for, XSLoader::load dies with perl’s own message for a compiled part that is not there:
Can't locate loadable object for module Some::Module in @INC (@INC contains: ...)
That is the message modules with a pure-Perl fallback test for, so a module that calls XSLoader::load inside eval and falls back when the call fails runs its pure-Perl part under pperl.