Subroutine libraries in Perl are called
modules, and modules that contain xsubs are called
XS modules. Perl provides a framework for developing, packaging, distributing, and installing modules. It may be desirable for a Perl program to invoke a C subroutine in order to handle very
CPU or
memory intensive tasks, to interface with
hardware or low-level system facilities, or to make use of existing C subroutine libraries.
Perl interpreter The
Perl interpreter is a C program, so in principle there is no obstacle to calling from Perl to C. However, the XS interface is complex and highly technical, and using it requires some understanding of the interpreter. The earliest reference on the subject was the perlguts
POD. ==Wrappers==