Dist::Zilla::Plugin::ModuleBuild::OptionalXS - Build a module that has an XS component that only optionally needs to be built.
version 0.01
In your dist.ini:
[ModuleBuild::OptionalXS]
This module is a Dist::Zilla plugin for building modules that have an XS component, but that are able to build and function even if there is no C compiler to build the XS component.
Like Dist::Zilla::Plugin::ModuleBuild::XSorPP this module supports --pp and --xs options to override the C compiler detection. With --pp, the XS component won't be built, even if a C compiler is available. With --xs, Module::Build will try to build the XS component even if it thinks that a C compiler isn't available (this will almost definitely fail).
--pp
--xs
When using this plugin, c_source => 'c' will be added to your Module::Build options. Any include files that you want to use from your .xs files can be placed in the c directory. If you want to include ppport.h, add
c_source => 'c'
.xs
c
ppport.h
[PPPort] filename = c/ppport.h
to your dist.ini.
Andrew Rodland <arodland@cpan.org>
This software is copyright (c) 2011 by Andrew Rodland.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dist::Zilla::Plugin::ModuleBuild::OptionalXS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::ModuleBuild::OptionalXS
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::ModuleBuild::OptionalXS
For more information on module installation, please visit the detailed CPAN module installation guide.