NAME
Module::Build::Pluggable::PDL - Plugin to Module::Build to build PDL projets
VERSION
version 0.23
SYNOPSIS
# Build.PL
use strict;
use warnings;
use Module::Build::Pluggable ('PDL');
my $builder = Module::Build::Pluggable->new(
dist_name => 'PDL::My::Module',
license => 'perl',
requires => { },
);
$builder->create_build_script();
DESCRIPTION
This is a plugin for Module::Build (using Module::Build::Pluggable) that will assist in building PDL distributions. Please see the Module::Build::Authoring documentation if you are not familiar with it.
- Add Prerequisites
-
requires => { 'PDL' => '2.000' }, build_requires => { 'PDL' => '2.000', 'ExtUtils::CBuilder' => '0.23', },You can, or course, require your own versions of these modules by adding them to
requires ={}> as usual. - Process
.pdfiles -
The
libdirectory of your distribution will be searched for.pdfiles and, immediately prior to the build phase, these will be processed byPDL::PPinto.xsand.pm. files as required to continue the build process. These will then be processed byExt::CBuilderas normal. These files are also added to the list of file to be cleaned up.In addition, an entry will be made into
providesfor the.pmfile of theMETA.json/ymlfiles. This will assist PAUSE, search.cpan.org and metacpan.org in properly indexing the distribution and - Generate
.podfile from the.pd -
When building the distribution (
./Build distor./Build distdir), any.pdfile found in thelibdirectory will converted into.podfiles. This produces a standalone version of the documentation which can be viewed on search.cpan.org, metacpan.org, etc. When these sites attempt to display the pod in the.pdfiles directly, there is often formatting and processing issues.This is accomplished by first processing the files with
PDL::PPand thenperldoc -u. - Add Include Dirs
-
include_dirs => PDL::Core::Dev::whereami_any() . '/Core';The
PDL/Coredirectory is added to theinclude_dirsflag. - Add Extra Linker Flags
-
extra_linker_flags => $PDL::Config{MALLOCDBG}->{libs} if $PDL::Config{MALLOCDBG}->{libs};If needed, the MALLOCDBG libs will be added to the
extra_linker_flags.
SEE ALSO
This is essentially a rewrite of David Mertens' Module::Build::PDL to use Module::Build::Pluggable. The conversion to Module::Build::Pluggable fixes multiple inheritance issues with subclassing Module::Build. In particular, I needed to be able use the Module::Build::Pluggable::Fortran in my PDL projects.
Thank you David++ for Module::Build::PDL.
Of course, all of this just tweaks the Module::Build setup.
AUTHOR
Mark Grimes, <mgrimes@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Mark Grimes, <mgrimes@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.