Generally called from the Makefile that builds your application to provide initialization functions for embedding Perl code in C or C++ applications. For example:
perl -MExtUtils::Embed -e xsinit perl -MExtUtils::Embed -e ldopts
Uses the configuration information kept in Config.pm (see the Config module above). Exports the following functions.
ccdlflags |
ccdlflags
Prints $Config{ccdlflags}.
ccflags |
ccflags
Prints $Config{ccflags}.
ccopts |
ccopts
Combines perl_inc, ccflags, and ccdlflags.
ldopts |
ldopts
Outputs arguments for linking the Perl library and extensions to your application. When invoked as:
perl -MExtUtils::Embed -e ldopts -
the following options are recognized:
Any additional arguments found before the -- token are taken as the names of modules to generate code for. Can also be called with parameters:
'ldopts($std,[@modules],[@link_args],$path)'
When called this way, returns the argument string rather than printing it to STDOUT. The optional parameters are:
perl_inc |
perl_inc
For including Perl header files. For example, if you say:
perl -MExtUtils::Embed -eperl_inc
the module prints the following:
-I$Config{archlibexp}/CORE
xsi_body |
xsi_body (modules)
Returns string of calls to newXS that glue the module bootstrap function to boot_ModuleName for each module in modules.
xsi_header |
xsi_header
Returns a string defining the same EXTERN_C macro as perlmain.c; also #include s perl.h and EXTERN.h.
xsinit |
xsinit
Generates C/C++ code for the XS initializer function. When invoked as:
perl -MExtUtils::Embed -e xsinit -
the following options are recognized:
Any additional arguments are expected to be names of modules to generate code for. Can also be called with parameters:
'xsinit($filename,$std,[@modules])'
When called this way, the following optional parameters are accepted:
xsi_protos |
xsi_protos (modules)
Returns string of boot_$ModuleName prototypes for each module in modules.
Copyright © 2002 O'Reilly & Associates. All rights reserved.