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.
pperl loads no shared objects. 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, as it does on a perl5 built without dynamic loading:
Can't load module Some::Module, dynamic loading not available in this perl.
A module that calls XSLoader::load inside eval and falls back to a pure-Perl implementation when the call fails therefore runs its pure-Perl part under pperl.