Linux "xsubpp" Command Line Options and Examples
compiler to convert Perl XS code into C code

This compiler is typically run by the makefiles created by ExtUtils::MakeMaker or by Module::Build or other Perl module build tools. xsubpp will compile XS code into C code by embedding the constructs necessary to let C functions manipulate Perl values and creates the glue necessary to let Perl access those functions.


Usage:

xsubpp [-v] [-except] [-s pattern] [-prototypes] [-noversioncheck] [-nolinenumbers] [-nooptimize] [-typemap
    typemap] [-output filename]... file.xs




Command Line Options:

-hiertype
Retains '::' in type names so that C++ hierarchical types can be mapped.
xsubpp -hiertype ...
-except
Adds exception handling stubs to the C code.
xsubpp -except ...
-typemap
Indicates that a user-supplied typemap should take precedence over the default typemaps. This option maybe used multiple times, with the last typemap having the highest precedence.
xsubpp -typemap ...
-output
Specifies the name of the output file to generate. If no file is specified, output will be written tostandard output.
xsubpp -output ...
-v
Prints the xsubpp version number to standard output, then exits.
xsubpp -v ...
-prototypes
By default xsubpp will not automatically generate prototype code for all xsubs. This flag will enableprototypes.
xsubpp -prototypes ...
-noversioncheck
Disables the run time test that determines if the object file (derived from the ".xs" file) and the ".pm"files have the same version number.
xsubpp -noversioncheck ...
-nolinenumbers
Prevents the inclusion of '#line' directives in the output.
xsubpp -nolinenumbers ...
-nooptimize
Disables certain optimizations. The only optimization that is currently affected is the use of targetsby the output C code (see perlguts). This may significantly slow down the generated code, but this isthe way xsubpp of 5.005 and earlier operated.
xsubpp -nooptimize ...
-noinout
Disable recognition of "IN", "OUT_LIST" and "INOUT_LIST" declarations.
xsubpp -noinout ...
-noargtypes
Disable recognition of ANSI-like descriptions of function signature.
xsubpp -noargtypes ...
-s=...
This option is obscure and discouraged.If specified, the given string will be stripped off from the beginning of the C function name in thegenerated XS functions (if it starts with that prefix). This only applies to XSUBs without "CODE" or"PPCODE" blocks. For example, the XS:void foo_bar(int i);when "xsubpp" is invoked with "-s foo_" will install a "foo_bar" function in Perl, but really call bar(i)in C. Most of the time, this is the opposite of what you want and failure modes are somewhat obscure, soplease avoid this option where possible.ENVIRONMENTNo environment variables are used.AUTHOROriginally by Larry Wall. Turned into the "ExtUtils::ParseXS" module by Ken Williams.MODIFICATION HISTORYSee the file Changes.
xsubpp -s=... ...