<?xml version="1.0" encoding="windows-1252"?>
<node id="458282" title="Module::Build users -- please use the &quot;traditional&quot; create_makefile_pl option" created="2005-05-18 12:35:41" updated="2005-08-12 07:03:20">
<type id="120">
perlmeditation</type>
<author id="104919">
perrin</author>
<data>
<field name="doctext">
I've been adding CPAN modules to a new project with an  automated build system which is based on the one in  [http://krang.sf.net|Krang].  This system runs the Makefile.PL, passing a PREFIX and LIB options.  We do this so we can throw away everything but the actual libs (PREFIX is set to a temp directory that gets erased).
&lt;p&gt;Lately, I've been running into a bunch of modules which use Module::Build.  That means they are not compatible, because the "passthrough" Makefile.PL that Module::Build creates doesn't work with PREFIX.
&lt;p&gt;However, none of these modules are making any use at all of Module::Build.  All of them would work 100% perfectly with MakeMaker and Makefile.PL.  In fact, Module::Build can generate a Makefile.PL that works correctly and honors PREFIX settings.  All you have to do is change the create_makefile_pl option in your Build.PL from "passthrough" to "traditional."  Here's an example:
&lt;CODE&gt;
use strict;
use Module::Build;

Module::Build-&gt;new( module_name =&gt; 'MyModule',
                    author      =&gt; 'Alice Munro &lt;alice@example.com&gt;',
                    license     =&gt; 'perl',
                    requires    =&gt; { 'Params::Validate' =&gt; 0,
                                   },
                    sign        =&gt; 1,
                    create_makefile_pl =&gt; 'traditional',
                  )-&gt;create_build_script;
&lt;/CODE&gt;
It's that easy!  Please, if you are a module author using Module::Build, make your work compatible with the tons of things out there that expect a normal perl install process by changing this one thing in your Build.PL and including the generated Makefile.PL in your distribution.  If you someday start using actual features of Module::Build that are not supported by MakeMaker, you can change it then.
&lt;p&gt;I expect I will eventually need to add Build.PL support to this system, but I don't want to do it for modules where it's so unnecessary.</field>
</data>
</node>
