Hello Monks,

I'm setting up continuous integration for some Perl modules and I have an issue with configure phase dependencies. My CI script looks like this:

#!/bin/bash -ex

workspace=$(mktemp -d)

function cleanup {
    rm -Rf "$workspace"
}

trap cleanup EXIT

perlbrew exec --with ${perlaxis} "cpanm -nvL '$workspace' --installdeps . && prove -I'$workspace/lib/perl5/' -lrvm t/"

For instance, one module requires Module::Build version 0.4004 or later (for test_requires support). So Build.PL has

configure_requires => {
    'Module::Build' => '0.4004',
},

This works when installing the packaged distribution because I can generate META.json, and so cpanm is aware of the configure phase dependencies. However, during CI, we are typically installing dependencies and running tests based on a clone of the repository, which doesn't contain META files (since those are supposed to be generated). So cpanm doesn't know about configure phase dependencies (and since it doesn't upgrade M::B, it also misses the test dependencies, and everything explodes).

What's the right fix here? (In my CI script or in Build.PL or anywhere else.)


In reply to How do I install configure phase dependencies automatically without META files available? by pokki

Title:
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, details, 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, summary, 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.