Module::Install::XSUtil - Utility functions for XS modules
This document describes Module::Install::XSUtil version 0.19.
# in Makefile.PL use inc::Module::Install; # Enables C compiler warnings cc_warnings; # Uses ppport.h # No need to include it. It's created here. use_ppport 3.19; # Sets C pre-processor macros. cc_define q{-DUSE_SOME_FEATURE=42}; # Sets paths for header files cc_include_paths 'include'; # all the header files are in include/ # Sets paths for source files cc_src_paths 'src'; # all the XS and C source files are in src/ # Installs header files install_headers; # all the header files in @cc_include_paths # This is a special version of requires(). # If XS::SomeFeature provides header files, # this will add its include paths into INC requies_xs 'XS::SomeFeature';
Module::Install::XSUtil provides a set of utilities to setup distributions which include or depend on XS module.
See XS::MRO::Compat and Method::Cumulative for example.
Returns true if a C compiler is available. If one passes --xs to Makefile.PL, this command returns true, and If one passes --pp, it returns false.
--xs
--pp
This uses ExtUtils::CBuilder.
ExtUtils::CBuilder
Does requires() and setup include paths and libraries for what $module provides.
requires()
Create ppport.h using Devel::PPPort::WriteFile().
Devel::PPPort::WriteFile()
This command calls configure_requires 'Devel::PPPort' => $version and adds -DUSE_PPPORT to MakeMaker's DEFINE.
configure_requires 'Devel::PPPort' => $version
-DUSE_PPPORT
MakeMaker
DEFINE
Enables C compiler warnings.
Sets cpp macros as compiler options.
cpp
Sets source file directories which include *.xs or *.c.
Sets include paths for a C compiler.
Declares providing header files, extracts functions from these header files, and adds these functions to MakeMaker's FUNCLIST.
FUNCLIST
If @header_files are omitted, all the header files in include paths will be installed.
Low level API.
Under the control of this module, Makefile.PL accepts -g option, which sets MakeMaker's OPTIMIE -g (or something like). It will disable optimization and enable some debugging features.
-g
OPTIMIE
Perl 5.5.3 or later.
In Makefile.PL, you might want to use author_requires, which is provided by Module::Install::AuthorReauires, in order to tell co-developers that they need to install this plugin.
author_requires
Module::Install::AuthorReauires
author_requires 'Module::Install::XSUtil';
No bugs have been reported.
Please report any bugs or feature requests to the author.
Goro Fuji (gfx) <gfuji(at)cpan.org>.
ExtUtils::Depends.
Module::Install.
Module::Install::CheckLib.
Devel::CheckLib.
ExtUtils::MakeMaker.
Copyright (c) 2009, Goro Fuji (gfx). Some rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Module::Install::XSUtil, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Install::XSUtil
CPAN shell
perl -MCPAN -e shell install Module::Install::XSUtil
For more information on module installation, please visit the detailed CPAN module installation guide.