The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Devel::Datum::MakeMaker - Offer to strip Devel::Datum calls statically

SYNOPSIS

# Put this at the top of the Makefile.PL for your module
use ExtUtils::MakeMaker;       # you may omit this line
use Devel::Datum::MakeMaker;

DESCRIPTION

The Devel::Datum::MakeMaker module supersedes the regular WriteMakefile() routine of ExtUtils::MakeMaker.

When running the Makefile.PL from your module interactively, the user will be asked whether calls to Devel::Datum should be stripped at build time.

By default, or when running non-interactively, most calls to Devel::Datum routines will be removed: the datum_strip program will be invoked to filter your *.pm files during the build process. This program is a mere wrapper for the datum_strip() routine, defined in Devel::Datum::Strip.

The only call that will not be stripped is the DTRACE() call. However, it will be dynamically remapped to a Log::Agent call. It cannot be statically remapped because of its baroque interface.

At the top of your Makefile.PL, you should put

use Devel::Datum::MakeMaker;

which will take care of loading ExtUtils::MakeMaker for you. Note that it makes sense to refer to this module, since you're using Devel::Datum internally, and therefore the user will not be able to install your module if he does not have Devel::Datum already installed.

If you wish to be nicer about Devel::Datum not being installed, you can say instead:

use ExtUtils::MakeMaker;
eval "use Devel::Datum::MakeMaker;";

WriteMakefile(
    'NAME'      => "Your::module::name",
    'PREREQ_PM' => {
        'Devel::Datum'  => '0.100',
    },
);

It will allow them to run the Makefile.PL, and yet be reminded about the missing Devel::Datum module. Chances are they won't be able to go much farther though...

AUTHORS

Christophe Dehaudt <christophe@dehaudt.org> and Raphael Manfredi <Raphael_Manfredi@pobox.com>.

SEE ALSO

Devel::Datum::Strip(3), ExtUtils::MakeMaker(3).