|
The MODULE keyword is used to start the XS code and to specify the package of the functions
which are being defined. All text preceding the first MODULE keyword is considered C code and
is passed through to the output with POD stripped, but otherwise untouched. Every XS module
will have a bootstrap function which is used to hook the XSUBs into Perl. The package name of
this bootstrap function will match the value of the last MODULE statement in the XS source
files. The value of MODULE should always remain constant within the same XS file, though this
is not required.
The following example will start the XS code and will place all functions in a package
named RPC.
|
|