h2xs [OPTIONS ... ] [headerfile [extra_libraries]]
version: 1.23
OPTIONS:
-A, --omit-autoload Omit all autoloading facilities (implies -c).
-B, --beta-version Use beta $VERSION of 0.00_01 (ignored if -v).
-C, --omit-changes Omit creating the Changes file, add HISTORY heading
to stub POD.
-F, --cpp-flags Additional flags for C preprocessor/compile.
-M, --func-mask Mask to select C functions/macros
(default is select all).
-O, --overwrite-ok Allow overwriting of a pre-existing extension directory.
-P, --omit-pod Omit the stub POD section.
-X, --omit-XS Omit the XS portion (implies both -c and -f).
-a, --gen-accessors Generate get/set accessors for struct and union members
(used with -x).
-b, --compat-version Specify a perl version to be backwards compatible with.
-c, --omit-constant Omit the constant() function and specialised AUTOLOAD
from the XS file.
-d, --debugging Turn on debugging messages.
-e, --omit-enums Omit constants from enums in the constant() function.
If a pattern is given, only the matching enums are
ignored.
-f, --force Force creation of the extension even if the C header
does not exist.
-g, --global Include code for safely storing static data in the .xs file.
-h, -?, --help Display this help message.
-k, --omit-const-func Omit 'const' attribute on function arguments
(used with -x).
-m, --gen-tied-var Generate tied variables for access to declared
variables.
-n, --name Specify a name to use for the extension (recommended).
-o, --opaque-re Regular expression for "opaque" types.
-p, --remove-prefix Specify a prefix which should be removed from the
Perl function names.
-s, --const-subs Create subroutines for specified macros.
-t, --default-type Default type for autoloaded constants (default is IV).
--use-new-tests Use Test::More in backward compatible modules.
--use-old-tests Use the module Test rather than Test::More.
--skip-exporter Do not export symbols.
--skip-ppport Do not use portability layer.
--skip-autoloader Do not use the module C<AutoLoader>.
--skip-strict Do not use the pragma C<strict>.
--skip-warnings Do not use the pragma C<warnings>.
-v, --version Specify a version number for this extension.
-x, --autogen-xsubs Autogenerate XSUBs using C::Scan.
--use-xsloader Use XSLoader in backward compatible modules (ignored
when used with -X).
extra_libraries
are any libraries that might be needed for loading the
extension, e.g. -lm would try to link in the math library.
Options (33)
| Option | Description | Source |
|---|
-A, --omit-autoload | Omit all autoloading facilities (implies -c). | help + man |
-B, --beta-version | Use beta $VERSION of 0.00_01 (ignored if -v). | help + man |
-C, --omit-changes | Omits creation of the Changes file, and adds a HISTORY section to the POD template. | help + man |
-F, --cpp-flags addflags | Additional flags to specify to C preprocessor when scanning header for function declarations. | help + man |
-M, --func-mask regular | Mask to select C functions/macros (default is select all). | help + man |
-O, --overwrite-ok | Allows a pre-existing extension directory to be overwritten. | help + man |
-P, --omit-pod | Omit the autogenerated stub POD section. | help + man |
-X, --omit-XS | Omit the XS portion (implies both -c and -f). | help + man |
-a, --gen-accessors | Generate get/set accessors for struct and union members (used with -x). | help + man |
-b, --compat-version version | Generates a .pm file which is backwards compatible with the specified perl version. | help + man |
-c, --omit-constant | Omit constant() from the .xs file and corresponding specialised "AUTOLOAD" from the .pm file. | help + man |
-d, --debugging | Turn on debugging messages. | help + man |
-e, --omit-enums | Omit constants from enums in the constant() function. | help |
-f, --force | Allows an extension to be created for a header even if that header is not found in standard include directories. | help + man |
-g, --global | Include code for safely storing static data in the .xs file. | help + man |
-h, -?, --help | Print the usage, help and version for this h2xs and exit. | help + man |
-m, --gen-tied-var | Experimental: for each variable declared in the header file(s), declare a perl variable of the same name magically tied to the C variable. | help + man |
-n, --name module_name | Specifies a name to be used for the extension, e.g., -n RPC::DCE | help + man |
-o, --opaque-re regular | Use "opaque" data type for the C types matched by the regular expression, even if these types are "typedef"-equivalent to types from typemaps. | help + man |
-p, --remove-prefix prefix | Specify a prefix which should be removed from the Perl function names, e.g., -p sec_rgy_ This sets up the XS PREFIX keyword and removes the prefix from functions that are autoloaded via the… | help + man |
-s, --const-subs sub1 | Create a perl subroutine for the specified macros rather than autoload with the constant() subroutine. | help + man |
-t, --default-type type | Specify the internal type that the constant() mechanism uses for macros. | help + man |
--use-new-tests | When --compat-version (-b) is present the generated tests will use "Test::More" rather than "Test" which is the default for versions before 5.6.2. | help + man |
--use-old-tests | Will force the generation of test code that uses the older "Test" module. | help + man |
--skip-exporter | Do not use "Exporter" and/or export any symbol. | help + man |
--skip-ppport | Do not use "Devel::PPPort": no portability to older version. | help + man |
--skip-strict | Do not use the pragma C<strict>. | help + man |
--skip-warnings | Do not use the pragma C<warnings>. | help + man |
-v, --version version | Specify a version number for this extension. | help + man |
-x, --autogen-xsubs | Automatically generate XSUBs basing on function declarations in the header file. | help + man |
--use-xsloader | Use XSLoader in backward compatible modules (ignored when used with -X). | help |
-k, --omit-const-func | For function arguments declared as "const", omit the const attribute in the generated XS code. (in the manual page but not in --help) | man |
--skip-autoloader | Do not use the module "AutoLoader"; (in the manual page but not in --help) | man |
Examples (4) from the manual page, untested
Default behavior, extension is Rusersh2xs -Afn Ext::Ension
Start with a dummy run of h2xs:h2xs -Oxan Ext::Ension interface_simple.h interface_hairy.h
Run h2xs, overwriting older autogenerated files:cd Ext/Ension
As usual, run
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.