Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I've been adding CPAN modules to a new project with an automated build system which is based on the one in 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).

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.

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:

use strict; use Module::Build; Module::Build->new( module_name => 'MyModule', author => 'Alice Munro <>', license => 'perl', requires => { 'Params::Validate' => 0, }, sign => 1, create_makefile_pl => 'traditional', )->create_build_script;
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.

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.

In reply to Module::Build users -- please use the "traditional" create_makefile_pl option by perrin

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (9)
    As of 2017-11-23 13:26 GMT
    Find Nodes?
      Voting Booth?
      In order to be able to say "I know Perl", you must have:

      Results (335 votes). Check out past polls.