[Previous] [Contents] [Next]


Extensible and Embeddable

The Perl modules provide a reusable interface for many commonly used programming tasks. Many of the modules are also Perl extensions, which means that some component of their interface is actually written using the Perl XSUB language. After the XSUB code is translated to C, it is compiled with a C compiler. The functions in the C code are then accessible as Perl subroutines in your program.

Perl5 is now embeddable, as well. A programmer can create a Perl interpreter in any regular program written in C and, through the use of CallBacks and other internal routines, interface to the Perl interpreter within his or her program. This capability can provide an extremely powerful set of additional features for editors, servers, and other tools.

Note:

The details regarding XSUB programming and creation of shared libraries are beyond the scope of this tutorial. In this book, I don't tell you more than what you need to use them in your Perl programs. I assume that they've been built and installed on your machine. Likewise for embedded Perl, I only mention it here as a new feature.



[Previous] [Contents] [Next]